1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | declare namespace ts {
|
17 | const versionMajorMinor = "4.0";
|
18 |
|
19 | const version: string;
|
20 | |
21 |
|
22 |
|
23 |
|
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 |
|
35 | interface ReadonlyCollection<K> {
|
36 | readonly size: number;
|
37 | has(key: K): boolean;
|
38 | keys(): Iterator<K>;
|
39 | }
|
40 |
|
41 | interface Collection<K> extends ReadonlyCollection<K> {
|
42 | delete(key: K): boolean;
|
43 | clear(): void;
|
44 | }
|
45 |
|
46 | interface ReadonlyESMap<K, V> extends ReadonlyCollection<K> {
|
47 | get(key: K): V | undefined;
|
48 | values(): Iterator<V>;
|
49 | entries(): Iterator<[K, V]>;
|
50 | forEach(action: (value: V, key: K) => void): void;
|
51 | }
|
52 | |
53 |
|
54 |
|
55 | interface ReadonlyMap<T> extends ReadonlyESMap<string, T> {
|
56 | }
|
57 |
|
58 | interface ESMap<K, V> extends ReadonlyESMap<K, V>, Collection<K> {
|
59 | set(key: K, value: V): this;
|
60 | }
|
61 | |
62 |
|
63 |
|
64 | interface Map<T> extends ESMap<string, T> {
|
65 | }
|
66 |
|
67 | interface ReadonlySet<T> extends ReadonlyCollection<T> {
|
68 | has(value: T): boolean;
|
69 | values(): Iterator<T>;
|
70 | entries(): Iterator<[T, T]>;
|
71 | forEach(action: (value: T, key: T) => void): void;
|
72 | }
|
73 |
|
74 | interface Set<T> extends ReadonlySet<T>, Collection<T> {
|
75 | add(value: T): this;
|
76 | delete(value: T): boolean;
|
77 | }
|
78 |
|
79 | interface Iterator<T> {
|
80 | next(): {
|
81 | value: T;
|
82 | done?: false;
|
83 | } | {
|
84 | value: never;
|
85 | done: true;
|
86 | };
|
87 | }
|
88 |
|
89 | interface Push<T> {
|
90 | push(...values: T[]): void;
|
91 | }
|
92 | }
|
93 | declare namespace ts {
|
94 | export type Path = string & {
|
95 | __pathBrand: any;
|
96 | };
|
97 | export interface TextRange {
|
98 | pos: number;
|
99 | end: number;
|
100 | }
|
101 | export interface ReadonlyTextRange {
|
102 | readonly pos: number;
|
103 | readonly end: number;
|
104 | }
|
105 | export enum SyntaxKind {
|
106 | Unknown = 0,
|
107 | EndOfFileToken = 1,
|
108 | SingleLineCommentTrivia = 2,
|
109 | MultiLineCommentTrivia = 3,
|
110 | NewLineTrivia = 4,
|
111 | WhitespaceTrivia = 5,
|
112 | ShebangTrivia = 6,
|
113 | ConflictMarkerTrivia = 7,
|
114 | NumericLiteral = 8,
|
115 | BigIntLiteral = 9,
|
116 | StringLiteral = 10,
|
117 | JsxText = 11,
|
118 | JsxTextAllWhiteSpaces = 12,
|
119 | RegularExpressionLiteral = 13,
|
120 | NoSubstitutionTemplateLiteral = 14,
|
121 | TemplateHead = 15,
|
122 | TemplateMiddle = 16,
|
123 | TemplateTail = 17,
|
124 | OpenBraceToken = 18,
|
125 | CloseBraceToken = 19,
|
126 | OpenParenToken = 20,
|
127 | CloseParenToken = 21,
|
128 | OpenBracketToken = 22,
|
129 | CloseBracketToken = 23,
|
130 | DotToken = 24,
|
131 | DotDotDotToken = 25,
|
132 | SemicolonToken = 26,
|
133 | CommaToken = 27,
|
134 | QuestionDotToken = 28,
|
135 | LessThanToken = 29,
|
136 | LessThanSlashToken = 30,
|
137 | GreaterThanToken = 31,
|
138 | LessThanEqualsToken = 32,
|
139 | GreaterThanEqualsToken = 33,
|
140 | EqualsEqualsToken = 34,
|
141 | ExclamationEqualsToken = 35,
|
142 | EqualsEqualsEqualsToken = 36,
|
143 | ExclamationEqualsEqualsToken = 37,
|
144 | EqualsGreaterThanToken = 38,
|
145 | PlusToken = 39,
|
146 | MinusToken = 40,
|
147 | AsteriskToken = 41,
|
148 | AsteriskAsteriskToken = 42,
|
149 | SlashToken = 43,
|
150 | PercentToken = 44,
|
151 | PlusPlusToken = 45,
|
152 | MinusMinusToken = 46,
|
153 | LessThanLessThanToken = 47,
|
154 | GreaterThanGreaterThanToken = 48,
|
155 | GreaterThanGreaterThanGreaterThanToken = 49,
|
156 | AmpersandToken = 50,
|
157 | BarToken = 51,
|
158 | CaretToken = 52,
|
159 | ExclamationToken = 53,
|
160 | TildeToken = 54,
|
161 | AmpersandAmpersandToken = 55,
|
162 | BarBarToken = 56,
|
163 | QuestionToken = 57,
|
164 | ColonToken = 58,
|
165 | AtToken = 59,
|
166 | QuestionQuestionToken = 60,
|
167 |
|
168 | BacktickToken = 61,
|
169 | EqualsToken = 62,
|
170 | PlusEqualsToken = 63,
|
171 | MinusEqualsToken = 64,
|
172 | AsteriskEqualsToken = 65,
|
173 | AsteriskAsteriskEqualsToken = 66,
|
174 | SlashEqualsToken = 67,
|
175 | PercentEqualsToken = 68,
|
176 | LessThanLessThanEqualsToken = 69,
|
177 | GreaterThanGreaterThanEqualsToken = 70,
|
178 | GreaterThanGreaterThanGreaterThanEqualsToken = 71,
|
179 | AmpersandEqualsToken = 72,
|
180 | BarEqualsToken = 73,
|
181 | BarBarEqualsToken = 74,
|
182 | AmpersandAmpersandEqualsToken = 75,
|
183 | QuestionQuestionEqualsToken = 76,
|
184 | CaretEqualsToken = 77,
|
185 | Identifier = 78,
|
186 | PrivateIdentifier = 79,
|
187 | BreakKeyword = 80,
|
188 | CaseKeyword = 81,
|
189 | CatchKeyword = 82,
|
190 | ClassKeyword = 83,
|
191 | ConstKeyword = 84,
|
192 | ContinueKeyword = 85,
|
193 | DebuggerKeyword = 86,
|
194 | DefaultKeyword = 87,
|
195 | DeleteKeyword = 88,
|
196 | DoKeyword = 89,
|
197 | ElseKeyword = 90,
|
198 | EnumKeyword = 91,
|
199 | ExportKeyword = 92,
|
200 | ExtendsKeyword = 93,
|
201 | FalseKeyword = 94,
|
202 | FinallyKeyword = 95,
|
203 | ForKeyword = 96,
|
204 | FunctionKeyword = 97,
|
205 | IfKeyword = 98,
|
206 | ImportKeyword = 99,
|
207 | InKeyword = 100,
|
208 | InstanceOfKeyword = 101,
|
209 | NewKeyword = 102,
|
210 | NullKeyword = 103,
|
211 | ReturnKeyword = 104,
|
212 | SuperKeyword = 105,
|
213 | SwitchKeyword = 106,
|
214 | ThisKeyword = 107,
|
215 | ThrowKeyword = 108,
|
216 | TrueKeyword = 109,
|
217 | TryKeyword = 110,
|
218 | TypeOfKeyword = 111,
|
219 | VarKeyword = 112,
|
220 | VoidKeyword = 113,
|
221 | WhileKeyword = 114,
|
222 | WithKeyword = 115,
|
223 | ImplementsKeyword = 116,
|
224 | InterfaceKeyword = 117,
|
225 | LetKeyword = 118,
|
226 | PackageKeyword = 119,
|
227 | PrivateKeyword = 120,
|
228 | ProtectedKeyword = 121,
|
229 | PublicKeyword = 122,
|
230 | StaticKeyword = 123,
|
231 | YieldKeyword = 124,
|
232 | AbstractKeyword = 125,
|
233 | AsKeyword = 126,
|
234 | AssertsKeyword = 127,
|
235 | AnyKeyword = 128,
|
236 | AsyncKeyword = 129,
|
237 | AwaitKeyword = 130,
|
238 | BooleanKeyword = 131,
|
239 | ConstructorKeyword = 132,
|
240 | DeclareKeyword = 133,
|
241 | GetKeyword = 134,
|
242 | InferKeyword = 135,
|
243 | IsKeyword = 136,
|
244 | KeyOfKeyword = 137,
|
245 | ModuleKeyword = 138,
|
246 | NamespaceKeyword = 139,
|
247 | NeverKeyword = 140,
|
248 | ReadonlyKeyword = 141,
|
249 | RequireKeyword = 142,
|
250 | NumberKeyword = 143,
|
251 | ObjectKeyword = 144,
|
252 | SetKeyword = 145,
|
253 | StringKeyword = 146,
|
254 | SymbolKeyword = 147,
|
255 | TypeKeyword = 148,
|
256 | UndefinedKeyword = 149,
|
257 | UniqueKeyword = 150,
|
258 | UnknownKeyword = 151,
|
259 | FromKeyword = 152,
|
260 | GlobalKeyword = 153,
|
261 | BigIntKeyword = 154,
|
262 | OfKeyword = 155,
|
263 | QualifiedName = 156,
|
264 | ComputedPropertyName = 157,
|
265 | TypeParameter = 158,
|
266 | Parameter = 159,
|
267 | Decorator = 160,
|
268 | PropertySignature = 161,
|
269 | PropertyDeclaration = 162,
|
270 | MethodSignature = 163,
|
271 | MethodDeclaration = 164,
|
272 | Constructor = 165,
|
273 | GetAccessor = 166,
|
274 | SetAccessor = 167,
|
275 | CallSignature = 168,
|
276 | ConstructSignature = 169,
|
277 | IndexSignature = 170,
|
278 | TypePredicate = 171,
|
279 | TypeReference = 172,
|
280 | FunctionType = 173,
|
281 | ConstructorType = 174,
|
282 | TypeQuery = 175,
|
283 | TypeLiteral = 176,
|
284 | ArrayType = 177,
|
285 | TupleType = 178,
|
286 | OptionalType = 179,
|
287 | RestType = 180,
|
288 | UnionType = 181,
|
289 | IntersectionType = 182,
|
290 | ConditionalType = 183,
|
291 | InferType = 184,
|
292 | ParenthesizedType = 185,
|
293 | ThisType = 186,
|
294 | TypeOperator = 187,
|
295 | IndexedAccessType = 188,
|
296 | MappedType = 189,
|
297 | LiteralType = 190,
|
298 | NamedTupleMember = 191,
|
299 | ImportType = 192,
|
300 | ObjectBindingPattern = 193,
|
301 | ArrayBindingPattern = 194,
|
302 | BindingElement = 195,
|
303 | ArrayLiteralExpression = 196,
|
304 | ObjectLiteralExpression = 197,
|
305 | PropertyAccessExpression = 198,
|
306 | ElementAccessExpression = 199,
|
307 | CallExpression = 200,
|
308 | NewExpression = 201,
|
309 | TaggedTemplateExpression = 202,
|
310 | TypeAssertionExpression = 203,
|
311 | ParenthesizedExpression = 204,
|
312 | FunctionExpression = 205,
|
313 | ArrowFunction = 206,
|
314 | DeleteExpression = 207,
|
315 | TypeOfExpression = 208,
|
316 | VoidExpression = 209,
|
317 | AwaitExpression = 210,
|
318 | PrefixUnaryExpression = 211,
|
319 | PostfixUnaryExpression = 212,
|
320 | BinaryExpression = 213,
|
321 | ConditionalExpression = 214,
|
322 | TemplateExpression = 215,
|
323 | YieldExpression = 216,
|
324 | SpreadElement = 217,
|
325 | ClassExpression = 218,
|
326 | OmittedExpression = 219,
|
327 | ExpressionWithTypeArguments = 220,
|
328 | AsExpression = 221,
|
329 | NonNullExpression = 222,
|
330 | MetaProperty = 223,
|
331 | SyntheticExpression = 224,
|
332 | TemplateSpan = 225,
|
333 | SemicolonClassElement = 226,
|
334 | Block = 227,
|
335 | EmptyStatement = 228,
|
336 | VariableStatement = 229,
|
337 | ExpressionStatement = 230,
|
338 | IfStatement = 231,
|
339 | DoStatement = 232,
|
340 | WhileStatement = 233,
|
341 | ForStatement = 234,
|
342 | ForInStatement = 235,
|
343 | ForOfStatement = 236,
|
344 | ContinueStatement = 237,
|
345 | BreakStatement = 238,
|
346 | ReturnStatement = 239,
|
347 | WithStatement = 240,
|
348 | SwitchStatement = 241,
|
349 | LabeledStatement = 242,
|
350 | ThrowStatement = 243,
|
351 | TryStatement = 244,
|
352 | DebuggerStatement = 245,
|
353 | VariableDeclaration = 246,
|
354 | VariableDeclarationList = 247,
|
355 | FunctionDeclaration = 248,
|
356 | ClassDeclaration = 249,
|
357 | InterfaceDeclaration = 250,
|
358 | TypeAliasDeclaration = 251,
|
359 | EnumDeclaration = 252,
|
360 | ModuleDeclaration = 253,
|
361 | ModuleBlock = 254,
|
362 | CaseBlock = 255,
|
363 | NamespaceExportDeclaration = 256,
|
364 | ImportEqualsDeclaration = 257,
|
365 | ImportDeclaration = 258,
|
366 | ImportClause = 259,
|
367 | NamespaceImport = 260,
|
368 | NamedImports = 261,
|
369 | ImportSpecifier = 262,
|
370 | ExportAssignment = 263,
|
371 | ExportDeclaration = 264,
|
372 | NamedExports = 265,
|
373 | NamespaceExport = 266,
|
374 | ExportSpecifier = 267,
|
375 | MissingDeclaration = 268,
|
376 | ExternalModuleReference = 269,
|
377 | JsxElement = 270,
|
378 | JsxSelfClosingElement = 271,
|
379 | JsxOpeningElement = 272,
|
380 | JsxClosingElement = 273,
|
381 | JsxFragment = 274,
|
382 | JsxOpeningFragment = 275,
|
383 | JsxClosingFragment = 276,
|
384 | JsxAttribute = 277,
|
385 | JsxAttributes = 278,
|
386 | JsxSpreadAttribute = 279,
|
387 | JsxExpression = 280,
|
388 | CaseClause = 281,
|
389 | DefaultClause = 282,
|
390 | HeritageClause = 283,
|
391 | CatchClause = 284,
|
392 | PropertyAssignment = 285,
|
393 | ShorthandPropertyAssignment = 286,
|
394 | SpreadAssignment = 287,
|
395 | EnumMember = 288,
|
396 | UnparsedPrologue = 289,
|
397 | UnparsedPrepend = 290,
|
398 | UnparsedText = 291,
|
399 | UnparsedInternalText = 292,
|
400 | UnparsedSyntheticReference = 293,
|
401 | SourceFile = 294,
|
402 | Bundle = 295,
|
403 | UnparsedSource = 296,
|
404 | InputFiles = 297,
|
405 | JSDocTypeExpression = 298,
|
406 | JSDocAllType = 299,
|
407 | JSDocUnknownType = 300,
|
408 | JSDocNullableType = 301,
|
409 | JSDocNonNullableType = 302,
|
410 | JSDocOptionalType = 303,
|
411 | JSDocFunctionType = 304,
|
412 | JSDocVariadicType = 305,
|
413 | JSDocNamepathType = 306,
|
414 | JSDocComment = 307,
|
415 | JSDocTypeLiteral = 308,
|
416 | JSDocSignature = 309,
|
417 | JSDocTag = 310,
|
418 | JSDocAugmentsTag = 311,
|
419 | JSDocImplementsTag = 312,
|
420 | JSDocAuthorTag = 313,
|
421 | JSDocDeprecatedTag = 314,
|
422 | JSDocClassTag = 315,
|
423 | JSDocPublicTag = 316,
|
424 | JSDocPrivateTag = 317,
|
425 | JSDocProtectedTag = 318,
|
426 | JSDocReadonlyTag = 319,
|
427 | JSDocCallbackTag = 320,
|
428 | JSDocEnumTag = 321,
|
429 | JSDocParameterTag = 322,
|
430 | JSDocReturnTag = 323,
|
431 | JSDocThisTag = 324,
|
432 | JSDocTypeTag = 325,
|
433 | JSDocTemplateTag = 326,
|
434 | JSDocTypedefTag = 327,
|
435 | JSDocPropertyTag = 328,
|
436 | SyntaxList = 329,
|
437 | NotEmittedStatement = 330,
|
438 | PartiallyEmittedExpression = 331,
|
439 | CommaListExpression = 332,
|
440 | MergeDeclarationMarker = 333,
|
441 | EndOfDeclarationMarker = 334,
|
442 | SyntheticReferenceExpression = 335,
|
443 | Count = 336,
|
444 | FirstAssignment = 62,
|
445 | LastAssignment = 77,
|
446 | FirstCompoundAssignment = 63,
|
447 | LastCompoundAssignment = 77,
|
448 | FirstReservedWord = 80,
|
449 | LastReservedWord = 115,
|
450 | FirstKeyword = 80,
|
451 | LastKeyword = 155,
|
452 | FirstFutureReservedWord = 116,
|
453 | LastFutureReservedWord = 124,
|
454 | FirstTypeNode = 171,
|
455 | LastTypeNode = 192,
|
456 | FirstPunctuation = 18,
|
457 | LastPunctuation = 77,
|
458 | FirstToken = 0,
|
459 | LastToken = 155,
|
460 | FirstTriviaToken = 2,
|
461 | LastTriviaToken = 7,
|
462 | FirstLiteralToken = 8,
|
463 | LastLiteralToken = 14,
|
464 | FirstTemplateToken = 14,
|
465 | LastTemplateToken = 17,
|
466 | FirstBinaryOperator = 29,
|
467 | LastBinaryOperator = 77,
|
468 | FirstStatement = 229,
|
469 | LastStatement = 245,
|
470 | FirstNode = 156,
|
471 | FirstJSDocNode = 298,
|
472 | LastJSDocNode = 328,
|
473 | FirstJSDocTagNode = 310,
|
474 | LastJSDocTagNode = 328,
|
475 | }
|
476 | export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
|
477 | export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
|
478 | export type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail;
|
479 | export type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken;
|
480 | export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword;
|
481 | export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.StaticKeyword;
|
482 | export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword;
|
483 | export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind;
|
484 | export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken;
|
485 | export type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.Unknown | KeywordSyntaxKind;
|
486 | export enum NodeFlags {
|
487 | None = 0,
|
488 | Let = 1,
|
489 | Const = 2,
|
490 | NestedNamespace = 4,
|
491 | Synthesized = 8,
|
492 | Namespace = 16,
|
493 | OptionalChain = 32,
|
494 | ExportContext = 64,
|
495 | ContainsThis = 128,
|
496 | HasImplicitReturn = 256,
|
497 | HasExplicitReturn = 512,
|
498 | GlobalAugmentation = 1024,
|
499 | HasAsyncFunctions = 2048,
|
500 | DisallowInContext = 4096,
|
501 | YieldContext = 8192,
|
502 | DecoratorContext = 16384,
|
503 | AwaitContext = 32768,
|
504 | ThisNodeHasError = 65536,
|
505 | JavaScriptFile = 131072,
|
506 | ThisNodeOrAnySubNodesHasError = 262144,
|
507 | HasAggregatedChildData = 524288,
|
508 | JSDoc = 4194304,
|
509 | JsonFile = 33554432,
|
510 | BlockScoped = 3,
|
511 | ReachabilityCheckFlags = 768,
|
512 | ReachabilityAndEmitFlags = 2816,
|
513 | ContextFlags = 25358336,
|
514 | TypeExcludesFlags = 40960,
|
515 | }
|
516 | export enum ModifierFlags {
|
517 | None = 0,
|
518 | Export = 1,
|
519 | Ambient = 2,
|
520 | Public = 4,
|
521 | Private = 8,
|
522 | Protected = 16,
|
523 | Static = 32,
|
524 | Readonly = 64,
|
525 | Abstract = 128,
|
526 | Async = 256,
|
527 | Default = 512,
|
528 | Const = 2048,
|
529 | HasComputedJSDocModifiers = 4096,
|
530 | Deprecated = 8192,
|
531 | HasComputedFlags = 536870912,
|
532 | AccessibilityModifier = 28,
|
533 | ParameterPropertyModifier = 92,
|
534 | NonPublicAccessibilityModifier = 24,
|
535 | TypeScriptModifier = 2270,
|
536 | ExportDefault = 513,
|
537 | All = 11263
|
538 | }
|
539 | export enum JsxFlags {
|
540 | None = 0,
|
541 |
|
542 | IntrinsicNamedElement = 1,
|
543 |
|
544 | IntrinsicIndexedElement = 2,
|
545 | IntrinsicElement = 3
|
546 | }
|
547 | export interface Node extends ReadonlyTextRange {
|
548 | readonly kind: SyntaxKind;
|
549 | readonly flags: NodeFlags;
|
550 | readonly decorators?: NodeArray<Decorator>;
|
551 | readonly modifiers?: ModifiersArray;
|
552 | readonly parent: Node;
|
553 | }
|
554 | export interface JSDocContainer {
|
555 | }
|
556 | export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | LabeledStatement | ExpressionStatement | VariableStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
|
557 | export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
|
558 | export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
|
559 | export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
|
560 | export type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertySignature | PropertyDeclaration | PropertyAssignment | EnumMember;
|
561 | export interface NodeArray<T extends Node> extends ReadonlyArray<T>, ReadonlyTextRange {
|
562 | hasTrailingComma?: boolean;
|
563 | }
|
564 | export interface Token<TKind extends SyntaxKind> extends Node {
|
565 | readonly kind: TKind;
|
566 | }
|
567 | export type EndOfFileToken = Token<SyntaxKind.EndOfFileToken> & JSDocContainer;
|
568 | export interface PunctuationToken<TKind extends PunctuationSyntaxKind> extends Token<TKind> {
|
569 | }
|
570 | export type DotToken = PunctuationToken<SyntaxKind.DotToken>;
|
571 | export type DotDotDotToken = PunctuationToken<SyntaxKind.DotDotDotToken>;
|
572 | export type QuestionToken = PunctuationToken<SyntaxKind.QuestionToken>;
|
573 | export type ExclamationToken = PunctuationToken<SyntaxKind.ExclamationToken>;
|
574 | export type ColonToken = PunctuationToken<SyntaxKind.ColonToken>;
|
575 | export type EqualsToken = PunctuationToken<SyntaxKind.EqualsToken>;
|
576 | export type AsteriskToken = PunctuationToken<SyntaxKind.AsteriskToken>;
|
577 | export type EqualsGreaterThanToken = PunctuationToken<SyntaxKind.EqualsGreaterThanToken>;
|
578 | export type PlusToken = PunctuationToken<SyntaxKind.PlusToken>;
|
579 | export type MinusToken = PunctuationToken<SyntaxKind.MinusToken>;
|
580 | export type QuestionDotToken = PunctuationToken<SyntaxKind.QuestionDotToken>;
|
581 | export interface KeywordToken<TKind extends KeywordSyntaxKind> extends Token<TKind> {
|
582 | }
|
583 | export type AssertsKeyword = KeywordToken<SyntaxKind.AssertsKeyword>;
|
584 | export type AwaitKeyword = KeywordToken<SyntaxKind.AwaitKeyword>;
|
585 |
|
586 | export type AwaitKeywordToken = AwaitKeyword;
|
587 |
|
588 | export type AssertsToken = AssertsKeyword;
|
589 | export interface ModifierToken<TKind extends ModifierSyntaxKind> extends KeywordToken<TKind> {
|
590 | }
|
591 | export type AbstractKeyword = ModifierToken<SyntaxKind.AbstractKeyword>;
|
592 | export type AsyncKeyword = ModifierToken<SyntaxKind.AsyncKeyword>;
|
593 | export type ConstKeyword = ModifierToken<SyntaxKind.ConstKeyword>;
|
594 | export type DeclareKeyword = ModifierToken<SyntaxKind.DeclareKeyword>;
|
595 | export type DefaultKeyword = ModifierToken<SyntaxKind.DefaultKeyword>;
|
596 | export type ExportKeyword = ModifierToken<SyntaxKind.ExportKeyword>;
|
597 | export type PrivateKeyword = ModifierToken<SyntaxKind.PrivateKeyword>;
|
598 | export type ProtectedKeyword = ModifierToken<SyntaxKind.ProtectedKeyword>;
|
599 | export type PublicKeyword = ModifierToken<SyntaxKind.PublicKeyword>;
|
600 | export type ReadonlyKeyword = ModifierToken<SyntaxKind.ReadonlyKeyword>;
|
601 | export type StaticKeyword = ModifierToken<SyntaxKind.StaticKeyword>;
|
602 |
|
603 | export type ReadonlyToken = ReadonlyKeyword;
|
604 | export type Modifier = AbstractKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | ReadonlyKeyword | StaticKeyword;
|
605 | export type AccessibilityModifier = PublicKeyword | PrivateKeyword | ProtectedKeyword;
|
606 | export type ParameterPropertyModifier = AccessibilityModifier | ReadonlyKeyword;
|
607 | export type ClassMemberModifier = AccessibilityModifier | ReadonlyKeyword | StaticKeyword;
|
608 | export type ModifiersArray = NodeArray<Modifier>;
|
609 | export enum GeneratedIdentifierFlags {
|
610 | None = 0,
|
611 | ReservedInNestedScopes = 8,
|
612 | Optimistic = 16,
|
613 | FileLevel = 32
|
614 | }
|
615 | export interface Identifier extends PrimaryExpression, Declaration {
|
616 | readonly kind: SyntaxKind.Identifier;
|
617 | |
618 |
|
619 |
|
620 |
|
621 | readonly escapedText: __String;
|
622 | readonly originalKeywordKind?: SyntaxKind;
|
623 | isInJSDocNamespace?: boolean;
|
624 | }
|
625 | export interface TransientIdentifier extends Identifier {
|
626 | resolvedSymbol: Symbol;
|
627 | }
|
628 | export interface QualifiedName extends Node {
|
629 | readonly kind: SyntaxKind.QualifiedName;
|
630 | readonly left: EntityName;
|
631 | readonly right: Identifier;
|
632 | }
|
633 | export type EntityName = Identifier | QualifiedName;
|
634 | export type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier;
|
635 | export type DeclarationName = Identifier | PrivateIdentifier | StringLiteralLike | NumericLiteral | ComputedPropertyName | ElementAccessExpression | BindingPattern | EntityNameExpression;
|
636 | export interface Declaration extends Node {
|
637 | _declarationBrand: any;
|
638 | }
|
639 | export interface NamedDeclaration extends Declaration {
|
640 | readonly name?: DeclarationName;
|
641 | }
|
642 | export interface DeclarationStatement extends NamedDeclaration, Statement {
|
643 | readonly name?: Identifier | StringLiteral | NumericLiteral;
|
644 | }
|
645 | export interface ComputedPropertyName extends Node {
|
646 | readonly kind: SyntaxKind.ComputedPropertyName;
|
647 | readonly parent: Declaration;
|
648 | readonly expression: Expression;
|
649 | }
|
650 | export interface PrivateIdentifier extends Node {
|
651 | readonly kind: SyntaxKind.PrivateIdentifier;
|
652 | readonly escapedText: __String;
|
653 | }
|
654 | export interface Decorator extends Node {
|
655 | readonly kind: SyntaxKind.Decorator;
|
656 | readonly parent: NamedDeclaration;
|
657 | readonly expression: LeftHandSideExpression;
|
658 | }
|
659 | export interface TypeParameterDeclaration extends NamedDeclaration {
|
660 | readonly kind: SyntaxKind.TypeParameter;
|
661 | readonly parent: DeclarationWithTypeParameterChildren | InferTypeNode;
|
662 | readonly name: Identifier;
|
663 |
|
664 | readonly constraint?: TypeNode;
|
665 | readonly default?: TypeNode;
|
666 | expression?: Expression;
|
667 | }
|
668 | export interface SignatureDeclarationBase extends NamedDeclaration, JSDocContainer {
|
669 | readonly kind: SignatureDeclaration["kind"];
|
670 | readonly name?: PropertyName;
|
671 | readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
|
672 | readonly parameters: NodeArray<ParameterDeclaration>;
|
673 | readonly type?: TypeNode;
|
674 | }
|
675 | export type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction;
|
676 | export interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
|
677 | readonly kind: SyntaxKind.CallSignature;
|
678 | }
|
679 | export interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
|
680 | readonly kind: SyntaxKind.ConstructSignature;
|
681 | }
|
682 | export type BindingName = Identifier | BindingPattern;
|
683 | export interface VariableDeclaration extends NamedDeclaration {
|
684 | readonly kind: SyntaxKind.VariableDeclaration;
|
685 | readonly parent: VariableDeclarationList | CatchClause;
|
686 | readonly name: BindingName;
|
687 | readonly exclamationToken?: ExclamationToken;
|
688 | readonly type?: TypeNode;
|
689 | readonly initializer?: Expression;
|
690 | }
|
691 | export interface VariableDeclarationList extends Node {
|
692 | readonly kind: SyntaxKind.VariableDeclarationList;
|
693 | readonly parent: VariableStatement | ForStatement | ForOfStatement | ForInStatement;
|
694 | readonly declarations: NodeArray<VariableDeclaration>;
|
695 | }
|
696 | export interface ParameterDeclaration extends NamedDeclaration, JSDocContainer {
|
697 | readonly kind: SyntaxKind.Parameter;
|
698 | readonly parent: SignatureDeclaration;
|
699 | readonly dotDotDotToken?: DotDotDotToken;
|
700 | readonly name: BindingName;
|
701 | readonly questionToken?: QuestionToken;
|
702 | readonly type?: TypeNode;
|
703 | readonly initializer?: Expression;
|
704 | }
|
705 | export interface BindingElement extends NamedDeclaration {
|
706 | readonly kind: SyntaxKind.BindingElement;
|
707 | readonly parent: BindingPattern;
|
708 | readonly propertyName?: PropertyName;
|
709 | readonly dotDotDotToken?: DotDotDotToken;
|
710 | readonly name: BindingName;
|
711 | readonly initializer?: Expression;
|
712 | }
|
713 | export interface PropertySignature extends TypeElement, JSDocContainer {
|
714 | readonly kind: SyntaxKind.PropertySignature;
|
715 | readonly name: PropertyName;
|
716 | readonly questionToken?: QuestionToken;
|
717 | readonly type?: TypeNode;
|
718 | initializer?: Expression;
|
719 | }
|
720 | export interface PropertyDeclaration extends ClassElement, JSDocContainer {
|
721 | readonly kind: SyntaxKind.PropertyDeclaration;
|
722 | readonly parent: ClassLikeDeclaration;
|
723 | readonly name: PropertyName;
|
724 | readonly questionToken?: QuestionToken;
|
725 | readonly exclamationToken?: ExclamationToken;
|
726 | readonly type?: TypeNode;
|
727 | readonly initializer?: Expression;
|
728 | }
|
729 | export interface ObjectLiteralElement extends NamedDeclaration {
|
730 | _objectLiteralBrand: any;
|
731 | readonly name?: PropertyName;
|
732 | }
|
733 |
|
734 | export type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration;
|
735 | export interface PropertyAssignment extends ObjectLiteralElement, JSDocContainer {
|
736 | readonly kind: SyntaxKind.PropertyAssignment;
|
737 | readonly parent: ObjectLiteralExpression;
|
738 | readonly name: PropertyName;
|
739 | readonly questionToken?: QuestionToken;
|
740 | readonly exclamationToken?: ExclamationToken;
|
741 | readonly initializer: Expression;
|
742 | }
|
743 | export interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer {
|
744 | readonly kind: SyntaxKind.ShorthandPropertyAssignment;
|
745 | readonly parent: ObjectLiteralExpression;
|
746 | readonly name: Identifier;
|
747 | readonly questionToken?: QuestionToken;
|
748 | readonly exclamationToken?: ExclamationToken;
|
749 | readonly equalsToken?: EqualsToken;
|
750 | readonly objectAssignmentInitializer?: Expression;
|
751 | }
|
752 | export interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer {
|
753 | readonly kind: SyntaxKind.SpreadAssignment;
|
754 | readonly parent: ObjectLiteralExpression;
|
755 | readonly expression: Expression;
|
756 | }
|
757 | export type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag;
|
758 | export interface PropertyLikeDeclaration extends NamedDeclaration {
|
759 | readonly name: PropertyName;
|
760 | }
|
761 | export interface ObjectBindingPattern extends Node {
|
762 | readonly kind: SyntaxKind.ObjectBindingPattern;
|
763 | readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement;
|
764 | readonly elements: NodeArray<BindingElement>;
|
765 | }
|
766 | export interface ArrayBindingPattern extends Node {
|
767 | readonly kind: SyntaxKind.ArrayBindingPattern;
|
768 | readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement;
|
769 | readonly elements: NodeArray<ArrayBindingElement>;
|
770 | }
|
771 | export type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
|
772 | export type ArrayBindingElement = BindingElement | OmittedExpression;
|
773 | |
774 |
|
775 |
|
776 |
|
777 |
|
778 |
|
779 |
|
780 |
|
781 | export interface FunctionLikeDeclarationBase extends SignatureDeclarationBase {
|
782 | _functionLikeDeclarationBrand: any;
|
783 | readonly asteriskToken?: AsteriskToken;
|
784 | readonly questionToken?: QuestionToken;
|
785 | readonly exclamationToken?: ExclamationToken;
|
786 | readonly body?: Block | Expression;
|
787 | }
|
788 | export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction;
|
789 |
|
790 | export type FunctionLike = SignatureDeclaration;
|
791 | export interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement {
|
792 | readonly kind: SyntaxKind.FunctionDeclaration;
|
793 | readonly name?: Identifier;
|
794 | readonly body?: FunctionBody;
|
795 | }
|
796 | export interface MethodSignature extends SignatureDeclarationBase, TypeElement {
|
797 | readonly kind: SyntaxKind.MethodSignature;
|
798 | readonly parent: ObjectTypeDeclaration;
|
799 | readonly name: PropertyName;
|
800 | }
|
801 | export interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
|
802 | readonly kind: SyntaxKind.MethodDeclaration;
|
803 | readonly parent: ClassLikeDeclaration | ObjectLiteralExpression;
|
804 | readonly name: PropertyName;
|
805 | readonly body?: FunctionBody;
|
806 | }
|
807 | export interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer {
|
808 | readonly kind: SyntaxKind.Constructor;
|
809 | readonly parent: ClassLikeDeclaration;
|
810 | readonly body?: FunctionBody;
|
811 | }
|
812 |
|
813 | export interface SemicolonClassElement extends ClassElement {
|
814 | readonly kind: SyntaxKind.SemicolonClassElement;
|
815 | readonly parent: ClassLikeDeclaration;
|
816 | }
|
817 | export interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
|
818 | readonly kind: SyntaxKind.GetAccessor;
|
819 | readonly parent: ClassLikeDeclaration | ObjectLiteralExpression;
|
820 | readonly name: PropertyName;
|
821 | readonly body?: FunctionBody;
|
822 | }
|
823 | export interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
|
824 | readonly kind: SyntaxKind.SetAccessor;
|
825 | readonly parent: ClassLikeDeclaration | ObjectLiteralExpression;
|
826 | readonly name: PropertyName;
|
827 | readonly body?: FunctionBody;
|
828 | }
|
829 | export type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration;
|
830 | export interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement {
|
831 | readonly kind: SyntaxKind.IndexSignature;
|
832 | readonly parent: ObjectTypeDeclaration;
|
833 | readonly type: TypeNode;
|
834 | }
|
835 | export interface TypeNode extends Node {
|
836 | _typeNodeBrand: any;
|
837 | }
|
838 | export interface KeywordTypeNode<TKind extends KeywordTypeSyntaxKind = KeywordTypeSyntaxKind> extends KeywordToken<TKind>, TypeNode {
|
839 | readonly kind: TKind;
|
840 | }
|
841 | export interface ImportTypeNode extends NodeWithTypeArguments {
|
842 | readonly kind: SyntaxKind.ImportType;
|
843 | readonly isTypeOf: boolean;
|
844 | readonly argument: TypeNode;
|
845 | readonly qualifier?: EntityName;
|
846 | }
|
847 | export interface ThisTypeNode extends TypeNode {
|
848 | readonly kind: SyntaxKind.ThisType;
|
849 | }
|
850 | export type FunctionOrConstructorTypeNode = FunctionTypeNode | ConstructorTypeNode;
|
851 | export interface FunctionOrConstructorTypeNodeBase extends TypeNode, SignatureDeclarationBase {
|
852 | readonly kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType;
|
853 | readonly type: TypeNode;
|
854 | }
|
855 | export interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase {
|
856 | readonly kind: SyntaxKind.FunctionType;
|
857 | }
|
858 | export interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase {
|
859 | readonly kind: SyntaxKind.ConstructorType;
|
860 | }
|
861 | export interface NodeWithTypeArguments extends TypeNode {
|
862 | readonly typeArguments?: NodeArray<TypeNode>;
|
863 | }
|
864 | export type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments;
|
865 | export interface TypeReferenceNode extends NodeWithTypeArguments {
|
866 | readonly kind: SyntaxKind.TypeReference;
|
867 | readonly typeName: EntityName;
|
868 | }
|
869 | export interface TypePredicateNode extends TypeNode {
|
870 | readonly kind: SyntaxKind.TypePredicate;
|
871 | readonly parent: SignatureDeclaration | JSDocTypeExpression;
|
872 | readonly assertsModifier?: AssertsToken;
|
873 | readonly parameterName: Identifier | ThisTypeNode;
|
874 | readonly type?: TypeNode;
|
875 | }
|
876 | export interface TypeQueryNode extends TypeNode {
|
877 | readonly kind: SyntaxKind.TypeQuery;
|
878 | readonly exprName: EntityName;
|
879 | }
|
880 | export interface TypeLiteralNode extends TypeNode, Declaration {
|
881 | readonly kind: SyntaxKind.TypeLiteral;
|
882 | readonly members: NodeArray<TypeElement>;
|
883 | }
|
884 | export interface ArrayTypeNode extends TypeNode {
|
885 | readonly kind: SyntaxKind.ArrayType;
|
886 | readonly elementType: TypeNode;
|
887 | }
|
888 | export interface TupleTypeNode extends TypeNode {
|
889 | readonly kind: SyntaxKind.TupleType;
|
890 | readonly elements: NodeArray<TypeNode | NamedTupleMember>;
|
891 | }
|
892 | export interface NamedTupleMember extends TypeNode, JSDocContainer, Declaration {
|
893 | readonly kind: SyntaxKind.NamedTupleMember;
|
894 | readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
|
895 | readonly name: Identifier;
|
896 | readonly questionToken?: Token<SyntaxKind.QuestionToken>;
|
897 | readonly type: TypeNode;
|
898 | }
|
899 | export interface OptionalTypeNode extends TypeNode {
|
900 | readonly kind: SyntaxKind.OptionalType;
|
901 | readonly type: TypeNode;
|
902 | }
|
903 | export interface RestTypeNode extends TypeNode {
|
904 | readonly kind: SyntaxKind.RestType;
|
905 | readonly type: TypeNode;
|
906 | }
|
907 | export type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode;
|
908 | export interface UnionTypeNode extends TypeNode {
|
909 | readonly kind: SyntaxKind.UnionType;
|
910 | readonly types: NodeArray<TypeNode>;
|
911 | }
|
912 | export interface IntersectionTypeNode extends TypeNode {
|
913 | readonly kind: SyntaxKind.IntersectionType;
|
914 | readonly types: NodeArray<TypeNode>;
|
915 | }
|
916 | export interface ConditionalTypeNode extends TypeNode {
|
917 | readonly kind: SyntaxKind.ConditionalType;
|
918 | readonly checkType: TypeNode;
|
919 | readonly extendsType: TypeNode;
|
920 | readonly trueType: TypeNode;
|
921 | readonly falseType: TypeNode;
|
922 | }
|
923 | export interface InferTypeNode extends TypeNode {
|
924 | readonly kind: SyntaxKind.InferType;
|
925 | readonly typeParameter: TypeParameterDeclaration;
|
926 | }
|
927 | export interface ParenthesizedTypeNode extends TypeNode {
|
928 | readonly kind: SyntaxKind.ParenthesizedType;
|
929 | readonly type: TypeNode;
|
930 | }
|
931 | export interface TypeOperatorNode extends TypeNode {
|
932 | readonly kind: SyntaxKind.TypeOperator;
|
933 | readonly operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword;
|
934 | readonly type: TypeNode;
|
935 | }
|
936 | export interface IndexedAccessTypeNode extends TypeNode {
|
937 | readonly kind: SyntaxKind.IndexedAccessType;
|
938 | readonly objectType: TypeNode;
|
939 | readonly indexType: TypeNode;
|
940 | }
|
941 | export interface MappedTypeNode extends TypeNode, Declaration {
|
942 | readonly kind: SyntaxKind.MappedType;
|
943 | readonly readonlyToken?: ReadonlyToken | PlusToken | MinusToken;
|
944 | readonly typeParameter: TypeParameterDeclaration;
|
945 | readonly questionToken?: QuestionToken | PlusToken | MinusToken;
|
946 | readonly type?: TypeNode;
|
947 | }
|
948 | export interface LiteralTypeNode extends TypeNode {
|
949 | readonly kind: SyntaxKind.LiteralType;
|
950 | readonly literal: NullLiteral | BooleanLiteral | LiteralExpression | PrefixUnaryExpression;
|
951 | }
|
952 | export interface StringLiteral extends LiteralExpression, Declaration {
|
953 | readonly kind: SyntaxKind.StringLiteral;
|
954 | }
|
955 | export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral;
|
956 | export type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral;
|
957 | export interface Expression extends Node {
|
958 | _expressionBrand: any;
|
959 | }
|
960 | export interface OmittedExpression extends Expression {
|
961 | readonly kind: SyntaxKind.OmittedExpression;
|
962 | }
|
963 | export interface PartiallyEmittedExpression extends LeftHandSideExpression {
|
964 | readonly kind: SyntaxKind.PartiallyEmittedExpression;
|
965 | readonly expression: Expression;
|
966 | }
|
967 | export interface UnaryExpression extends Expression {
|
968 | _unaryExpressionBrand: any;
|
969 | }
|
970 |
|
971 | export type IncrementExpression = UpdateExpression;
|
972 | export interface UpdateExpression extends UnaryExpression {
|
973 | _updateExpressionBrand: any;
|
974 | }
|
975 | export type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken;
|
976 | export interface PrefixUnaryExpression extends UpdateExpression {
|
977 | readonly kind: SyntaxKind.PrefixUnaryExpression;
|
978 | readonly operator: PrefixUnaryOperator;
|
979 | readonly operand: UnaryExpression;
|
980 | }
|
981 | export type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
|
982 | export interface PostfixUnaryExpression extends UpdateExpression {
|
983 | readonly kind: SyntaxKind.PostfixUnaryExpression;
|
984 | readonly operand: LeftHandSideExpression;
|
985 | readonly operator: PostfixUnaryOperator;
|
986 | }
|
987 | export interface LeftHandSideExpression extends UpdateExpression {
|
988 | _leftHandSideExpressionBrand: any;
|
989 | }
|
990 | export interface MemberExpression extends LeftHandSideExpression {
|
991 | _memberExpressionBrand: any;
|
992 | }
|
993 | export interface PrimaryExpression extends MemberExpression {
|
994 | _primaryExpressionBrand: any;
|
995 | }
|
996 | export interface NullLiteral extends PrimaryExpression {
|
997 | readonly kind: SyntaxKind.NullKeyword;
|
998 | }
|
999 | export interface TrueLiteral extends PrimaryExpression {
|
1000 | readonly kind: SyntaxKind.TrueKeyword;
|
1001 | }
|
1002 | export interface FalseLiteral extends PrimaryExpression {
|
1003 | readonly kind: SyntaxKind.FalseKeyword;
|
1004 | }
|
1005 | export type BooleanLiteral = TrueLiteral | FalseLiteral;
|
1006 | export interface ThisExpression extends PrimaryExpression {
|
1007 | readonly kind: SyntaxKind.ThisKeyword;
|
1008 | }
|
1009 | export interface SuperExpression extends PrimaryExpression {
|
1010 | readonly kind: SyntaxKind.SuperKeyword;
|
1011 | }
|
1012 | export interface ImportExpression extends PrimaryExpression {
|
1013 | readonly kind: SyntaxKind.ImportKeyword;
|
1014 | }
|
1015 | export interface DeleteExpression extends UnaryExpression {
|
1016 | readonly kind: SyntaxKind.DeleteExpression;
|
1017 | readonly expression: UnaryExpression;
|
1018 | }
|
1019 | export interface TypeOfExpression extends UnaryExpression {
|
1020 | readonly kind: SyntaxKind.TypeOfExpression;
|
1021 | readonly expression: UnaryExpression;
|
1022 | }
|
1023 | export interface VoidExpression extends UnaryExpression {
|
1024 | readonly kind: SyntaxKind.VoidExpression;
|
1025 | readonly expression: UnaryExpression;
|
1026 | }
|
1027 | export interface AwaitExpression extends UnaryExpression {
|
1028 | readonly kind: SyntaxKind.AwaitExpression;
|
1029 | readonly expression: UnaryExpression;
|
1030 | }
|
1031 | export interface YieldExpression extends Expression {
|
1032 | readonly kind: SyntaxKind.YieldExpression;
|
1033 | readonly asteriskToken?: AsteriskToken;
|
1034 | readonly expression?: Expression;
|
1035 | }
|
1036 | export interface SyntheticExpression extends Expression {
|
1037 | readonly kind: SyntaxKind.SyntheticExpression;
|
1038 | readonly isSpread: boolean;
|
1039 | readonly type: Type;
|
1040 | readonly tupleNameSource?: ParameterDeclaration | NamedTupleMember;
|
1041 | }
|
1042 | export type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken;
|
1043 | export type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken;
|
1044 | export type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator;
|
1045 | export type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken;
|
1046 | export type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator;
|
1047 | export type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken;
|
1048 | export type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator;
|
1049 | export type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword;
|
1050 | export type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator;
|
1051 | export type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken;
|
1052 | export type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator;
|
1053 | export type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken;
|
1054 | export type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator;
|
1055 | export type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken;
|
1056 | export type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator;
|
1057 | export type CompoundAssignmentOperator = SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken;
|
1058 | export type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator;
|
1059 | export type AssignmentOperatorOrHigher = SyntaxKind.QuestionQuestionToken | LogicalOperatorOrHigher | AssignmentOperator;
|
1060 | export type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken;
|
1061 | export type LogicalOrCoalescingAssignmentOperator = SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionEqualsToken;
|
1062 | export type BinaryOperatorToken = Token<BinaryOperator>;
|
1063 | export interface BinaryExpression extends Expression, Declaration {
|
1064 | readonly kind: SyntaxKind.BinaryExpression;
|
1065 | readonly left: Expression;
|
1066 | readonly operatorToken: BinaryOperatorToken;
|
1067 | readonly right: Expression;
|
1068 | }
|
1069 | export type AssignmentOperatorToken = Token<AssignmentOperator>;
|
1070 | export interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression {
|
1071 | readonly left: LeftHandSideExpression;
|
1072 | readonly operatorToken: TOperator;
|
1073 | }
|
1074 | export interface ObjectDestructuringAssignment extends AssignmentExpression<EqualsToken> {
|
1075 | readonly left: ObjectLiteralExpression;
|
1076 | }
|
1077 | export interface ArrayDestructuringAssignment extends AssignmentExpression<EqualsToken> {
|
1078 | readonly left: ArrayLiteralExpression;
|
1079 | }
|
1080 | export type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment;
|
1081 | export type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | ObjectBindingOrAssignmentElement | ArrayBindingOrAssignmentElement;
|
1082 | export type ObjectBindingOrAssignmentElement = BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment;
|
1083 | export type ArrayBindingOrAssignmentElement = BindingElement | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression<EqualsToken> | Identifier | PropertyAccessExpression | ElementAccessExpression;
|
1084 | export type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment;
|
1085 | export type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Identifier | PropertyAccessExpression | ElementAccessExpression | OmittedExpression;
|
1086 | export type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression;
|
1087 | export type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression;
|
1088 | export type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression;
|
1089 | export type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern;
|
1090 | export interface ConditionalExpression extends Expression {
|
1091 | readonly kind: SyntaxKind.ConditionalExpression;
|
1092 | readonly condition: Expression;
|
1093 | readonly questionToken: QuestionToken;
|
1094 | readonly whenTrue: Expression;
|
1095 | readonly colonToken: ColonToken;
|
1096 | readonly whenFalse: Expression;
|
1097 | }
|
1098 | export type FunctionBody = Block;
|
1099 | export type ConciseBody = FunctionBody | Expression;
|
1100 | export interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer {
|
1101 | readonly kind: SyntaxKind.FunctionExpression;
|
1102 | readonly name?: Identifier;
|
1103 | readonly body: FunctionBody;
|
1104 | }
|
1105 | export interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer {
|
1106 | readonly kind: SyntaxKind.ArrowFunction;
|
1107 | readonly equalsGreaterThanToken: EqualsGreaterThanToken;
|
1108 | readonly body: ConciseBody;
|
1109 | readonly name: never;
|
1110 | }
|
1111 | export interface LiteralLikeNode extends Node {
|
1112 | text: string;
|
1113 | isUnterminated?: boolean;
|
1114 | hasExtendedUnicodeEscape?: boolean;
|
1115 | }
|
1116 | export interface TemplateLiteralLikeNode extends LiteralLikeNode {
|
1117 | rawText?: string;
|
1118 | }
|
1119 | export interface LiteralExpression extends LiteralLikeNode, PrimaryExpression {
|
1120 | _literalExpressionBrand: any;
|
1121 | }
|
1122 | export interface RegularExpressionLiteral extends LiteralExpression {
|
1123 | readonly kind: SyntaxKind.RegularExpressionLiteral;
|
1124 | }
|
1125 | export interface NoSubstitutionTemplateLiteral extends LiteralExpression, TemplateLiteralLikeNode, Declaration {
|
1126 | readonly kind: SyntaxKind.NoSubstitutionTemplateLiteral;
|
1127 | }
|
1128 | export enum TokenFlags {
|
1129 | None = 0,
|
1130 | Scientific = 16,
|
1131 | Octal = 32,
|
1132 | HexSpecifier = 64,
|
1133 | BinarySpecifier = 128,
|
1134 | OctalSpecifier = 256,
|
1135 | }
|
1136 | export interface NumericLiteral extends LiteralExpression, Declaration {
|
1137 | readonly kind: SyntaxKind.NumericLiteral;
|
1138 | }
|
1139 | export interface BigIntLiteral extends LiteralExpression {
|
1140 | readonly kind: SyntaxKind.BigIntLiteral;
|
1141 | }
|
1142 | export type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral;
|
1143 | export interface TemplateHead extends TemplateLiteralLikeNode {
|
1144 | readonly kind: SyntaxKind.TemplateHead;
|
1145 | readonly parent: TemplateExpression;
|
1146 | }
|
1147 | export interface TemplateMiddle extends TemplateLiteralLikeNode {
|
1148 | readonly kind: SyntaxKind.TemplateMiddle;
|
1149 | readonly parent: TemplateSpan;
|
1150 | }
|
1151 | export interface TemplateTail extends TemplateLiteralLikeNode {
|
1152 | readonly kind: SyntaxKind.TemplateTail;
|
1153 | readonly parent: TemplateSpan;
|
1154 | }
|
1155 | export type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail;
|
1156 | export type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken;
|
1157 | export interface TemplateExpression extends PrimaryExpression {
|
1158 | readonly kind: SyntaxKind.TemplateExpression;
|
1159 | readonly head: TemplateHead;
|
1160 | readonly templateSpans: NodeArray<TemplateSpan>;
|
1161 | }
|
1162 | export type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral;
|
1163 | export interface TemplateSpan extends Node {
|
1164 | readonly kind: SyntaxKind.TemplateSpan;
|
1165 | readonly parent: TemplateExpression;
|
1166 | readonly expression: Expression;
|
1167 | readonly literal: TemplateMiddle | TemplateTail;
|
1168 | }
|
1169 | export interface ParenthesizedExpression extends PrimaryExpression, JSDocContainer {
|
1170 | readonly kind: SyntaxKind.ParenthesizedExpression;
|
1171 | readonly expression: Expression;
|
1172 | }
|
1173 | export interface ArrayLiteralExpression extends PrimaryExpression {
|
1174 | readonly kind: SyntaxKind.ArrayLiteralExpression;
|
1175 | readonly elements: NodeArray<Expression>;
|
1176 | }
|
1177 | export interface SpreadElement extends Expression {
|
1178 | readonly kind: SyntaxKind.SpreadElement;
|
1179 | readonly parent: ArrayLiteralExpression | CallExpression | NewExpression;
|
1180 | readonly expression: Expression;
|
1181 | }
|
1182 | |
1183 |
|
1184 |
|
1185 |
|
1186 |
|
1187 |
|
1188 | export interface ObjectLiteralExpressionBase<T extends ObjectLiteralElement> extends PrimaryExpression, Declaration {
|
1189 | readonly properties: NodeArray<T>;
|
1190 | }
|
1191 | export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> {
|
1192 | readonly kind: SyntaxKind.ObjectLiteralExpression;
|
1193 | }
|
1194 | export type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
|
1195 | export type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
|
1196 | export type AccessExpression = PropertyAccessExpression | ElementAccessExpression;
|
1197 | export interface PropertyAccessExpression extends MemberExpression, NamedDeclaration {
|
1198 | readonly kind: SyntaxKind.PropertyAccessExpression;
|
1199 | readonly expression: LeftHandSideExpression;
|
1200 | readonly questionDotToken?: QuestionDotToken;
|
1201 | readonly name: Identifier | PrivateIdentifier;
|
1202 | }
|
1203 | export interface PropertyAccessChain extends PropertyAccessExpression {
|
1204 | _optionalChainBrand: any;
|
1205 | readonly name: Identifier | PrivateIdentifier;
|
1206 | }
|
1207 | export interface SuperPropertyAccessExpression extends PropertyAccessExpression {
|
1208 | readonly expression: SuperExpression;
|
1209 | }
|
1210 |
|
1211 | export interface PropertyAccessEntityNameExpression extends PropertyAccessExpression {
|
1212 | _propertyAccessExpressionLikeQualifiedNameBrand?: any;
|
1213 | readonly expression: EntityNameExpression;
|
1214 | readonly name: Identifier;
|
1215 | }
|
1216 | export interface ElementAccessExpression extends MemberExpression {
|
1217 | readonly kind: SyntaxKind.ElementAccessExpression;
|
1218 | readonly expression: LeftHandSideExpression;
|
1219 | readonly questionDotToken?: QuestionDotToken;
|
1220 | readonly argumentExpression: Expression;
|
1221 | }
|
1222 | export interface ElementAccessChain extends ElementAccessExpression {
|
1223 | _optionalChainBrand: any;
|
1224 | }
|
1225 | export interface SuperElementAccessExpression extends ElementAccessExpression {
|
1226 | readonly expression: SuperExpression;
|
1227 | }
|
1228 | export type SuperProperty = SuperPropertyAccessExpression | SuperElementAccessExpression;
|
1229 | export interface CallExpression extends LeftHandSideExpression, Declaration {
|
1230 | readonly kind: SyntaxKind.CallExpression;
|
1231 | readonly expression: LeftHandSideExpression;
|
1232 | readonly questionDotToken?: QuestionDotToken;
|
1233 | readonly typeArguments?: NodeArray<TypeNode>;
|
1234 | readonly arguments: NodeArray<Expression>;
|
1235 | }
|
1236 | export interface CallChain extends CallExpression {
|
1237 | _optionalChainBrand: any;
|
1238 | }
|
1239 | export type OptionalChain = PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain;
|
1240 | export interface SuperCall extends CallExpression {
|
1241 | readonly expression: SuperExpression;
|
1242 | }
|
1243 | export interface ImportCall extends CallExpression {
|
1244 | readonly expression: ImportExpression;
|
1245 | }
|
1246 | export interface ExpressionWithTypeArguments extends NodeWithTypeArguments {
|
1247 | readonly kind: SyntaxKind.ExpressionWithTypeArguments;
|
1248 | readonly parent: HeritageClause | JSDocAugmentsTag | JSDocImplementsTag;
|
1249 | readonly expression: LeftHandSideExpression;
|
1250 | }
|
1251 | export interface NewExpression extends PrimaryExpression, Declaration {
|
1252 | readonly kind: SyntaxKind.NewExpression;
|
1253 | readonly expression: LeftHandSideExpression;
|
1254 | readonly typeArguments?: NodeArray<TypeNode>;
|
1255 | readonly arguments?: NodeArray<Expression>;
|
1256 | }
|
1257 | export interface TaggedTemplateExpression extends MemberExpression {
|
1258 | readonly kind: SyntaxKind.TaggedTemplateExpression;
|
1259 | readonly tag: LeftHandSideExpression;
|
1260 | readonly typeArguments?: NodeArray<TypeNode>;
|
1261 | readonly template: TemplateLiteral;
|
1262 | }
|
1263 | export type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement;
|
1264 | export interface AsExpression extends Expression {
|
1265 | readonly kind: SyntaxKind.AsExpression;
|
1266 | readonly expression: Expression;
|
1267 | readonly type: TypeNode;
|
1268 | }
|
1269 | export interface TypeAssertion extends UnaryExpression {
|
1270 | readonly kind: SyntaxKind.TypeAssertionExpression;
|
1271 | readonly type: TypeNode;
|
1272 | readonly expression: UnaryExpression;
|
1273 | }
|
1274 | export type AssertionExpression = TypeAssertion | AsExpression;
|
1275 | export interface NonNullExpression extends LeftHandSideExpression {
|
1276 | readonly kind: SyntaxKind.NonNullExpression;
|
1277 | readonly expression: Expression;
|
1278 | }
|
1279 | export interface NonNullChain extends NonNullExpression {
|
1280 | _optionalChainBrand: any;
|
1281 | }
|
1282 | export interface MetaProperty extends PrimaryExpression {
|
1283 | readonly kind: SyntaxKind.MetaProperty;
|
1284 | readonly keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword;
|
1285 | readonly name: Identifier;
|
1286 | }
|
1287 | export interface JsxElement extends PrimaryExpression {
|
1288 | readonly kind: SyntaxKind.JsxElement;
|
1289 | readonly openingElement: JsxOpeningElement;
|
1290 | readonly children: NodeArray<JsxChild>;
|
1291 | readonly closingElement: JsxClosingElement;
|
1292 | }
|
1293 | export type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
|
1294 | export type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
|
1295 | export type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess;
|
1296 | export interface JsxTagNamePropertyAccess extends PropertyAccessExpression {
|
1297 | readonly expression: JsxTagNameExpression;
|
1298 | }
|
1299 | export interface JsxAttributes extends ObjectLiteralExpressionBase<JsxAttributeLike> {
|
1300 | readonly kind: SyntaxKind.JsxAttributes;
|
1301 | readonly parent: JsxOpeningLikeElement;
|
1302 | }
|
1303 | export interface JsxOpeningElement extends Expression {
|
1304 | readonly kind: SyntaxKind.JsxOpeningElement;
|
1305 | readonly parent: JsxElement;
|
1306 | readonly tagName: JsxTagNameExpression;
|
1307 | readonly typeArguments?: NodeArray<TypeNode>;
|
1308 | readonly attributes: JsxAttributes;
|
1309 | }
|
1310 | export interface JsxSelfClosingElement extends PrimaryExpression {
|
1311 | readonly kind: SyntaxKind.JsxSelfClosingElement;
|
1312 | readonly tagName: JsxTagNameExpression;
|
1313 | readonly typeArguments?: NodeArray<TypeNode>;
|
1314 | readonly attributes: JsxAttributes;
|
1315 | }
|
1316 | export interface JsxFragment extends PrimaryExpression {
|
1317 | readonly kind: SyntaxKind.JsxFragment;
|
1318 | readonly openingFragment: JsxOpeningFragment;
|
1319 | readonly children: NodeArray<JsxChild>;
|
1320 | readonly closingFragment: JsxClosingFragment;
|
1321 | }
|
1322 | export interface JsxOpeningFragment extends Expression {
|
1323 | readonly kind: SyntaxKind.JsxOpeningFragment;
|
1324 | readonly parent: JsxFragment;
|
1325 | }
|
1326 | export interface JsxClosingFragment extends Expression {
|
1327 | readonly kind: SyntaxKind.JsxClosingFragment;
|
1328 | readonly parent: JsxFragment;
|
1329 | }
|
1330 | export interface JsxAttribute extends ObjectLiteralElement {
|
1331 | readonly kind: SyntaxKind.JsxAttribute;
|
1332 | readonly parent: JsxAttributes;
|
1333 | readonly name: Identifier;
|
1334 | readonly initializer?: StringLiteral | JsxExpression;
|
1335 | }
|
1336 | export interface JsxSpreadAttribute extends ObjectLiteralElement {
|
1337 | readonly kind: SyntaxKind.JsxSpreadAttribute;
|
1338 | readonly parent: JsxAttributes;
|
1339 | readonly expression: Expression;
|
1340 | }
|
1341 | export interface JsxClosingElement extends Node {
|
1342 | readonly kind: SyntaxKind.JsxClosingElement;
|
1343 | readonly parent: JsxElement;
|
1344 | readonly tagName: JsxTagNameExpression;
|
1345 | }
|
1346 | export interface JsxExpression extends Expression {
|
1347 | readonly kind: SyntaxKind.JsxExpression;
|
1348 | readonly parent: JsxElement | JsxAttributeLike;
|
1349 | readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
|
1350 | readonly expression?: Expression;
|
1351 | }
|
1352 | export interface JsxText extends LiteralLikeNode {
|
1353 | readonly kind: SyntaxKind.JsxText;
|
1354 | readonly parent: JsxElement;
|
1355 | readonly containsOnlyTriviaWhiteSpaces: boolean;
|
1356 | }
|
1357 | export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
|
1358 | export interface Statement extends Node {
|
1359 | _statementBrand: any;
|
1360 | }
|
1361 | export interface NotEmittedStatement extends Statement {
|
1362 | readonly kind: SyntaxKind.NotEmittedStatement;
|
1363 | }
|
1364 | |
1365 |
|
1366 |
|
1367 | export interface CommaListExpression extends Expression {
|
1368 | readonly kind: SyntaxKind.CommaListExpression;
|
1369 | readonly elements: NodeArray<Expression>;
|
1370 | }
|
1371 | export interface EmptyStatement extends Statement {
|
1372 | readonly kind: SyntaxKind.EmptyStatement;
|
1373 | }
|
1374 | export interface DebuggerStatement extends Statement {
|
1375 | readonly kind: SyntaxKind.DebuggerStatement;
|
1376 | }
|
1377 | export interface MissingDeclaration extends DeclarationStatement {
|
1378 | readonly kind: SyntaxKind.MissingDeclaration;
|
1379 | readonly name?: Identifier;
|
1380 | }
|
1381 | export type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause;
|
1382 | export interface Block extends Statement {
|
1383 | readonly kind: SyntaxKind.Block;
|
1384 | readonly statements: NodeArray<Statement>;
|
1385 | }
|
1386 | export interface VariableStatement extends Statement, JSDocContainer {
|
1387 | readonly kind: SyntaxKind.VariableStatement;
|
1388 | readonly declarationList: VariableDeclarationList;
|
1389 | }
|
1390 | export interface ExpressionStatement extends Statement, JSDocContainer {
|
1391 | readonly kind: SyntaxKind.ExpressionStatement;
|
1392 | readonly expression: Expression;
|
1393 | }
|
1394 | export interface IfStatement extends Statement {
|
1395 | readonly kind: SyntaxKind.IfStatement;
|
1396 | readonly expression: Expression;
|
1397 | readonly thenStatement: Statement;
|
1398 | readonly elseStatement?: Statement;
|
1399 | }
|
1400 | export interface IterationStatement extends Statement {
|
1401 | readonly statement: Statement;
|
1402 | }
|
1403 | export interface DoStatement extends IterationStatement {
|
1404 | readonly kind: SyntaxKind.DoStatement;
|
1405 | readonly expression: Expression;
|
1406 | }
|
1407 | export interface WhileStatement extends IterationStatement {
|
1408 | readonly kind: SyntaxKind.WhileStatement;
|
1409 | readonly expression: Expression;
|
1410 | }
|
1411 | export type ForInitializer = VariableDeclarationList | Expression;
|
1412 | export interface ForStatement extends IterationStatement {
|
1413 | readonly kind: SyntaxKind.ForStatement;
|
1414 | readonly initializer?: ForInitializer;
|
1415 | readonly condition?: Expression;
|
1416 | readonly incrementor?: Expression;
|
1417 | }
|
1418 | export type ForInOrOfStatement = ForInStatement | ForOfStatement;
|
1419 | export interface ForInStatement extends IterationStatement {
|
1420 | readonly kind: SyntaxKind.ForInStatement;
|
1421 | readonly initializer: ForInitializer;
|
1422 | readonly expression: Expression;
|
1423 | }
|
1424 | export interface ForOfStatement extends IterationStatement {
|
1425 | readonly kind: SyntaxKind.ForOfStatement;
|
1426 | readonly awaitModifier?: AwaitKeywordToken;
|
1427 | readonly initializer: ForInitializer;
|
1428 | readonly expression: Expression;
|
1429 | }
|
1430 | export interface BreakStatement extends Statement {
|
1431 | readonly kind: SyntaxKind.BreakStatement;
|
1432 | readonly label?: Identifier;
|
1433 | }
|
1434 | export interface ContinueStatement extends Statement {
|
1435 | readonly kind: SyntaxKind.ContinueStatement;
|
1436 | readonly label?: Identifier;
|
1437 | }
|
1438 | export type BreakOrContinueStatement = BreakStatement | ContinueStatement;
|
1439 | export interface ReturnStatement extends Statement {
|
1440 | readonly kind: SyntaxKind.ReturnStatement;
|
1441 | readonly expression?: Expression;
|
1442 | }
|
1443 | export interface WithStatement extends Statement {
|
1444 | readonly kind: SyntaxKind.WithStatement;
|
1445 | readonly expression: Expression;
|
1446 | readonly statement: Statement;
|
1447 | }
|
1448 | export interface SwitchStatement extends Statement {
|
1449 | readonly kind: SyntaxKind.SwitchStatement;
|
1450 | readonly expression: Expression;
|
1451 | readonly caseBlock: CaseBlock;
|
1452 | possiblyExhaustive?: boolean;
|
1453 | }
|
1454 | export interface CaseBlock extends Node {
|
1455 | readonly kind: SyntaxKind.CaseBlock;
|
1456 | readonly parent: SwitchStatement;
|
1457 | readonly clauses: NodeArray<CaseOrDefaultClause>;
|
1458 | }
|
1459 | export interface CaseClause extends Node {
|
1460 | readonly kind: SyntaxKind.CaseClause;
|
1461 | readonly parent: CaseBlock;
|
1462 | readonly expression: Expression;
|
1463 | readonly statements: NodeArray<Statement>;
|
1464 | }
|
1465 | export interface DefaultClause extends Node {
|
1466 | readonly kind: SyntaxKind.DefaultClause;
|
1467 | readonly parent: CaseBlock;
|
1468 | readonly statements: NodeArray<Statement>;
|
1469 | }
|
1470 | export type CaseOrDefaultClause = CaseClause | DefaultClause;
|
1471 | export interface LabeledStatement extends Statement, JSDocContainer {
|
1472 | readonly kind: SyntaxKind.LabeledStatement;
|
1473 | readonly label: Identifier;
|
1474 | readonly statement: Statement;
|
1475 | }
|
1476 | export interface ThrowStatement extends Statement {
|
1477 | readonly kind: SyntaxKind.ThrowStatement;
|
1478 | readonly expression: Expression;
|
1479 | }
|
1480 | export interface TryStatement extends Statement {
|
1481 | readonly kind: SyntaxKind.TryStatement;
|
1482 | readonly tryBlock: Block;
|
1483 | readonly catchClause?: CatchClause;
|
1484 | readonly finallyBlock?: Block;
|
1485 | }
|
1486 | export interface CatchClause extends Node {
|
1487 | readonly kind: SyntaxKind.CatchClause;
|
1488 | readonly parent: TryStatement;
|
1489 | readonly variableDeclaration?: VariableDeclaration;
|
1490 | readonly block: Block;
|
1491 | }
|
1492 | export type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode;
|
1493 | export type DeclarationWithTypeParameters = DeclarationWithTypeParameterChildren | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature;
|
1494 | export type DeclarationWithTypeParameterChildren = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag;
|
1495 | export interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer {
|
1496 | readonly kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression;
|
1497 | readonly name?: Identifier;
|
1498 | readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
|
1499 | readonly heritageClauses?: NodeArray<HeritageClause>;
|
1500 | readonly members: NodeArray<ClassElement>;
|
1501 | }
|
1502 | export interface ClassDeclaration extends ClassLikeDeclarationBase, DeclarationStatement {
|
1503 | readonly kind: SyntaxKind.ClassDeclaration;
|
1504 |
|
1505 | readonly name?: Identifier;
|
1506 | }
|
1507 | export interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression {
|
1508 | readonly kind: SyntaxKind.ClassExpression;
|
1509 | }
|
1510 | export type ClassLikeDeclaration = ClassDeclaration | ClassExpression;
|
1511 | export interface ClassElement extends NamedDeclaration {
|
1512 | _classElementBrand: any;
|
1513 | readonly name?: PropertyName;
|
1514 | }
|
1515 | export interface TypeElement extends NamedDeclaration {
|
1516 | _typeElementBrand: any;
|
1517 | readonly name?: PropertyName;
|
1518 | readonly questionToken?: QuestionToken;
|
1519 | }
|
1520 | export interface InterfaceDeclaration extends DeclarationStatement, JSDocContainer {
|
1521 | readonly kind: SyntaxKind.InterfaceDeclaration;
|
1522 | readonly name: Identifier;
|
1523 | readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
|
1524 | readonly heritageClauses?: NodeArray<HeritageClause>;
|
1525 | readonly members: NodeArray<TypeElement>;
|
1526 | }
|
1527 | export interface HeritageClause extends Node {
|
1528 | readonly kind: SyntaxKind.HeritageClause;
|
1529 | readonly parent: InterfaceDeclaration | ClassLikeDeclaration;
|
1530 | readonly token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword;
|
1531 | readonly types: NodeArray<ExpressionWithTypeArguments>;
|
1532 | }
|
1533 | export interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer {
|
1534 | readonly kind: SyntaxKind.TypeAliasDeclaration;
|
1535 | readonly name: Identifier;
|
1536 | readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
|
1537 | readonly type: TypeNode;
|
1538 | }
|
1539 | export interface EnumMember extends NamedDeclaration, JSDocContainer {
|
1540 | readonly kind: SyntaxKind.EnumMember;
|
1541 | readonly parent: EnumDeclaration;
|
1542 | readonly name: PropertyName;
|
1543 | readonly initializer?: Expression;
|
1544 | }
|
1545 | export interface EnumDeclaration extends DeclarationStatement, JSDocContainer {
|
1546 | readonly kind: SyntaxKind.EnumDeclaration;
|
1547 | readonly name: Identifier;
|
1548 | readonly members: NodeArray<EnumMember>;
|
1549 | }
|
1550 | export type ModuleName = Identifier | StringLiteral;
|
1551 | export type ModuleBody = NamespaceBody | JSDocNamespaceBody;
|
1552 | export interface ModuleDeclaration extends DeclarationStatement, JSDocContainer {
|
1553 | readonly kind: SyntaxKind.ModuleDeclaration;
|
1554 | readonly parent: ModuleBody | SourceFile;
|
1555 | readonly name: ModuleName;
|
1556 | readonly body?: ModuleBody | JSDocNamespaceDeclaration;
|
1557 | }
|
1558 | export type NamespaceBody = ModuleBlock | NamespaceDeclaration;
|
1559 | export interface NamespaceDeclaration extends ModuleDeclaration {
|
1560 | readonly name: Identifier;
|
1561 | readonly body: NamespaceBody;
|
1562 | }
|
1563 | export type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration;
|
1564 | export interface JSDocNamespaceDeclaration extends ModuleDeclaration {
|
1565 | readonly name: Identifier;
|
1566 | readonly body?: JSDocNamespaceBody;
|
1567 | }
|
1568 | export interface ModuleBlock extends Node, Statement {
|
1569 | readonly kind: SyntaxKind.ModuleBlock;
|
1570 | readonly parent: ModuleDeclaration;
|
1571 | readonly statements: NodeArray<Statement>;
|
1572 | }
|
1573 | export type ModuleReference = EntityName | ExternalModuleReference;
|
1574 | |
1575 |
|
1576 |
|
1577 |
|
1578 |
|
1579 | export interface ImportEqualsDeclaration extends DeclarationStatement, JSDocContainer {
|
1580 | readonly kind: SyntaxKind.ImportEqualsDeclaration;
|
1581 | readonly parent: SourceFile | ModuleBlock;
|
1582 | readonly name: Identifier;
|
1583 | readonly moduleReference: ModuleReference;
|
1584 | }
|
1585 | export interface ExternalModuleReference extends Node {
|
1586 | readonly kind: SyntaxKind.ExternalModuleReference;
|
1587 | readonly parent: ImportEqualsDeclaration;
|
1588 | readonly expression: Expression;
|
1589 | }
|
1590 | export interface ImportDeclaration extends Statement, JSDocContainer {
|
1591 | readonly kind: SyntaxKind.ImportDeclaration;
|
1592 | readonly parent: SourceFile | ModuleBlock;
|
1593 | readonly importClause?: ImportClause;
|
1594 |
|
1595 | readonly moduleSpecifier: Expression;
|
1596 | }
|
1597 | export type NamedImportBindings = NamespaceImport | NamedImports;
|
1598 | export type NamedExportBindings = NamespaceExport | NamedExports;
|
1599 | export interface ImportClause extends NamedDeclaration {
|
1600 | readonly kind: SyntaxKind.ImportClause;
|
1601 | readonly parent: ImportDeclaration;
|
1602 | readonly isTypeOnly: boolean;
|
1603 | readonly name?: Identifier;
|
1604 | readonly namedBindings?: NamedImportBindings;
|
1605 | }
|
1606 | export interface NamespaceImport extends NamedDeclaration {
|
1607 | readonly kind: SyntaxKind.NamespaceImport;
|
1608 | readonly parent: ImportClause;
|
1609 | readonly name: Identifier;
|
1610 | }
|
1611 | export interface NamespaceExport extends NamedDeclaration {
|
1612 | readonly kind: SyntaxKind.NamespaceExport;
|
1613 | readonly parent: ExportDeclaration;
|
1614 | readonly name: Identifier;
|
1615 | }
|
1616 | export interface NamespaceExportDeclaration extends DeclarationStatement, JSDocContainer {
|
1617 | readonly kind: SyntaxKind.NamespaceExportDeclaration;
|
1618 | readonly name: Identifier;
|
1619 | }
|
1620 | export interface ExportDeclaration extends DeclarationStatement, JSDocContainer {
|
1621 | readonly kind: SyntaxKind.ExportDeclaration;
|
1622 | readonly parent: SourceFile | ModuleBlock;
|
1623 | readonly isTypeOnly: boolean;
|
1624 |
|
1625 | readonly exportClause?: NamedExportBindings;
|
1626 |
|
1627 | readonly moduleSpecifier?: Expression;
|
1628 | }
|
1629 | export interface NamedImports extends Node {
|
1630 | readonly kind: SyntaxKind.NamedImports;
|
1631 | readonly parent: ImportClause;
|
1632 | readonly elements: NodeArray<ImportSpecifier>;
|
1633 | }
|
1634 | export interface NamedExports extends Node {
|
1635 | readonly kind: SyntaxKind.NamedExports;
|
1636 | readonly parent: ExportDeclaration;
|
1637 | readonly elements: NodeArray<ExportSpecifier>;
|
1638 | }
|
1639 | export type NamedImportsOrExports = NamedImports | NamedExports;
|
1640 | export interface ImportSpecifier extends NamedDeclaration {
|
1641 | readonly kind: SyntaxKind.ImportSpecifier;
|
1642 | readonly parent: NamedImports;
|
1643 | readonly propertyName?: Identifier;
|
1644 | readonly name: Identifier;
|
1645 | }
|
1646 | export interface ExportSpecifier extends NamedDeclaration {
|
1647 | readonly kind: SyntaxKind.ExportSpecifier;
|
1648 | readonly parent: NamedExports;
|
1649 | readonly propertyName?: Identifier;
|
1650 | readonly name: Identifier;
|
1651 | }
|
1652 | export type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;
|
1653 | export type TypeOnlyCompatibleAliasDeclaration = ImportClause | NamespaceImport | ImportOrExportSpecifier;
|
1654 | |
1655 |
|
1656 |
|
1657 |
|
1658 | export interface ExportAssignment extends DeclarationStatement, JSDocContainer {
|
1659 | readonly kind: SyntaxKind.ExportAssignment;
|
1660 | readonly parent: SourceFile;
|
1661 | readonly isExportEquals?: boolean;
|
1662 | readonly expression: Expression;
|
1663 | }
|
1664 | export interface FileReference extends TextRange {
|
1665 | fileName: string;
|
1666 | }
|
1667 | export interface CheckJsDirective extends TextRange {
|
1668 | enabled: boolean;
|
1669 | }
|
1670 | export type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia;
|
1671 | export interface CommentRange extends TextRange {
|
1672 | hasTrailingNewLine?: boolean;
|
1673 | kind: CommentKind;
|
1674 | }
|
1675 | export interface SynthesizedComment extends CommentRange {
|
1676 | text: string;
|
1677 | pos: -1;
|
1678 | end: -1;
|
1679 | hasLeadingNewline?: boolean;
|
1680 | }
|
1681 | export interface JSDocTypeExpression extends TypeNode {
|
1682 | readonly kind: SyntaxKind.JSDocTypeExpression;
|
1683 | readonly type: TypeNode;
|
1684 | }
|
1685 | export interface JSDocType extends TypeNode {
|
1686 | _jsDocTypeBrand: any;
|
1687 | }
|
1688 | export interface JSDocAllType extends JSDocType {
|
1689 | readonly kind: SyntaxKind.JSDocAllType;
|
1690 | }
|
1691 | export interface JSDocUnknownType extends JSDocType {
|
1692 | readonly kind: SyntaxKind.JSDocUnknownType;
|
1693 | }
|
1694 | export interface JSDocNonNullableType extends JSDocType {
|
1695 | readonly kind: SyntaxKind.JSDocNonNullableType;
|
1696 | readonly type: TypeNode;
|
1697 | }
|
1698 | export interface JSDocNullableType extends JSDocType {
|
1699 | readonly kind: SyntaxKind.JSDocNullableType;
|
1700 | readonly type: TypeNode;
|
1701 | }
|
1702 | export interface JSDocOptionalType extends JSDocType {
|
1703 | readonly kind: SyntaxKind.JSDocOptionalType;
|
1704 | readonly type: TypeNode;
|
1705 | }
|
1706 | export interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase {
|
1707 | readonly kind: SyntaxKind.JSDocFunctionType;
|
1708 | }
|
1709 | export interface JSDocVariadicType extends JSDocType {
|
1710 | readonly kind: SyntaxKind.JSDocVariadicType;
|
1711 | readonly type: TypeNode;
|
1712 | }
|
1713 | export interface JSDocNamepathType extends JSDocType {
|
1714 | readonly kind: SyntaxKind.JSDocNamepathType;
|
1715 | readonly type: TypeNode;
|
1716 | }
|
1717 | export type JSDocTypeReferencingNode = JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType;
|
1718 | export interface JSDoc extends Node {
|
1719 | readonly kind: SyntaxKind.JSDocComment;
|
1720 | readonly parent: HasJSDoc;
|
1721 | readonly tags?: NodeArray<JSDocTag>;
|
1722 | readonly comment?: string;
|
1723 | }
|
1724 | export interface JSDocTag extends Node {
|
1725 | readonly parent: JSDoc | JSDocTypeLiteral;
|
1726 | readonly tagName: Identifier;
|
1727 | readonly comment?: string;
|
1728 | }
|
1729 | export interface JSDocUnknownTag extends JSDocTag {
|
1730 | readonly kind: SyntaxKind.JSDocTag;
|
1731 | }
|
1732 | |
1733 |
|
1734 |
|
1735 |
|
1736 | export interface JSDocAugmentsTag extends JSDocTag {
|
1737 | readonly kind: SyntaxKind.JSDocAugmentsTag;
|
1738 | readonly class: ExpressionWithTypeArguments & {
|
1739 | readonly expression: Identifier | PropertyAccessEntityNameExpression;
|
1740 | };
|
1741 | }
|
1742 | export interface JSDocImplementsTag extends JSDocTag {
|
1743 | readonly kind: SyntaxKind.JSDocImplementsTag;
|
1744 | readonly class: ExpressionWithTypeArguments & {
|
1745 | readonly expression: Identifier | PropertyAccessEntityNameExpression;
|
1746 | };
|
1747 | }
|
1748 | export interface JSDocAuthorTag extends JSDocTag {
|
1749 | readonly kind: SyntaxKind.JSDocAuthorTag;
|
1750 | }
|
1751 | export interface JSDocDeprecatedTag extends JSDocTag {
|
1752 | kind: SyntaxKind.JSDocDeprecatedTag;
|
1753 | }
|
1754 | export interface JSDocClassTag extends JSDocTag {
|
1755 | readonly kind: SyntaxKind.JSDocClassTag;
|
1756 | }
|
1757 | export interface JSDocPublicTag extends JSDocTag {
|
1758 | readonly kind: SyntaxKind.JSDocPublicTag;
|
1759 | }
|
1760 | export interface JSDocPrivateTag extends JSDocTag {
|
1761 | readonly kind: SyntaxKind.JSDocPrivateTag;
|
1762 | }
|
1763 | export interface JSDocProtectedTag extends JSDocTag {
|
1764 | readonly kind: SyntaxKind.JSDocProtectedTag;
|
1765 | }
|
1766 | export interface JSDocReadonlyTag extends JSDocTag {
|
1767 | readonly kind: SyntaxKind.JSDocReadonlyTag;
|
1768 | }
|
1769 | export interface JSDocEnumTag extends JSDocTag, Declaration {
|
1770 | readonly kind: SyntaxKind.JSDocEnumTag;
|
1771 | readonly parent: JSDoc;
|
1772 | readonly typeExpression: JSDocTypeExpression;
|
1773 | }
|
1774 | export interface JSDocThisTag extends JSDocTag {
|
1775 | readonly kind: SyntaxKind.JSDocThisTag;
|
1776 | readonly typeExpression: JSDocTypeExpression;
|
1777 | }
|
1778 | export interface JSDocTemplateTag extends JSDocTag {
|
1779 | readonly kind: SyntaxKind.JSDocTemplateTag;
|
1780 | readonly constraint: JSDocTypeExpression | undefined;
|
1781 | readonly typeParameters: NodeArray<TypeParameterDeclaration>;
|
1782 | }
|
1783 | export interface JSDocReturnTag extends JSDocTag {
|
1784 | readonly kind: SyntaxKind.JSDocReturnTag;
|
1785 | readonly typeExpression?: JSDocTypeExpression;
|
1786 | }
|
1787 | export interface JSDocTypeTag extends JSDocTag {
|
1788 | readonly kind: SyntaxKind.JSDocTypeTag;
|
1789 | readonly typeExpression: JSDocTypeExpression;
|
1790 | }
|
1791 | export interface JSDocTypedefTag extends JSDocTag, NamedDeclaration {
|
1792 | readonly kind: SyntaxKind.JSDocTypedefTag;
|
1793 | readonly parent: JSDoc;
|
1794 | readonly fullName?: JSDocNamespaceDeclaration | Identifier;
|
1795 | readonly name?: Identifier;
|
1796 | readonly typeExpression?: JSDocTypeExpression | JSDocTypeLiteral;
|
1797 | }
|
1798 | export interface JSDocCallbackTag extends JSDocTag, NamedDeclaration {
|
1799 | readonly kind: SyntaxKind.JSDocCallbackTag;
|
1800 | readonly parent: JSDoc;
|
1801 | readonly fullName?: JSDocNamespaceDeclaration | Identifier;
|
1802 | readonly name?: Identifier;
|
1803 | readonly typeExpression: JSDocSignature;
|
1804 | }
|
1805 | export interface JSDocSignature extends JSDocType, Declaration {
|
1806 | readonly kind: SyntaxKind.JSDocSignature;
|
1807 | readonly typeParameters?: readonly JSDocTemplateTag[];
|
1808 | readonly parameters: readonly JSDocParameterTag[];
|
1809 | readonly type: JSDocReturnTag | undefined;
|
1810 | }
|
1811 | export interface JSDocPropertyLikeTag extends JSDocTag, Declaration {
|
1812 | readonly parent: JSDoc;
|
1813 | readonly name: EntityName;
|
1814 | readonly typeExpression?: JSDocTypeExpression;
|
1815 |
|
1816 | readonly isNameFirst: boolean;
|
1817 | readonly isBracketed: boolean;
|
1818 | }
|
1819 | export interface JSDocPropertyTag extends JSDocPropertyLikeTag {
|
1820 | readonly kind: SyntaxKind.JSDocPropertyTag;
|
1821 | }
|
1822 | export interface JSDocParameterTag extends JSDocPropertyLikeTag {
|
1823 | readonly kind: SyntaxKind.JSDocParameterTag;
|
1824 | }
|
1825 | export interface JSDocTypeLiteral extends JSDocType {
|
1826 | readonly kind: SyntaxKind.JSDocTypeLiteral;
|
1827 | readonly jsDocPropertyTags?: readonly JSDocPropertyLikeTag[];
|
1828 |
|
1829 | readonly isArrayType: boolean;
|
1830 | }
|
1831 | export enum FlowFlags {
|
1832 | Unreachable = 1,
|
1833 | Start = 2,
|
1834 | BranchLabel = 4,
|
1835 | LoopLabel = 8,
|
1836 | Assignment = 16,
|
1837 | TrueCondition = 32,
|
1838 | FalseCondition = 64,
|
1839 | SwitchClause = 128,
|
1840 | ArrayMutation = 256,
|
1841 | Call = 512,
|
1842 | ReduceLabel = 1024,
|
1843 | Referenced = 2048,
|
1844 | Shared = 4096,
|
1845 | Label = 12,
|
1846 | Condition = 96
|
1847 | }
|
1848 | export type FlowNode = FlowStart | FlowLabel | FlowAssignment | FlowCall | FlowCondition | FlowSwitchClause | FlowArrayMutation | FlowCall | FlowReduceLabel;
|
1849 | export interface FlowNodeBase {
|
1850 | flags: FlowFlags;
|
1851 | id?: number;
|
1852 | }
|
1853 | export interface FlowStart extends FlowNodeBase {
|
1854 | node?: FunctionExpression | ArrowFunction | MethodDeclaration;
|
1855 | }
|
1856 | export interface FlowLabel extends FlowNodeBase {
|
1857 | antecedents: FlowNode[] | undefined;
|
1858 | }
|
1859 | export interface FlowAssignment extends FlowNodeBase {
|
1860 | node: Expression | VariableDeclaration | BindingElement;
|
1861 | antecedent: FlowNode;
|
1862 | }
|
1863 | export interface FlowCall extends FlowNodeBase {
|
1864 | node: CallExpression;
|
1865 | antecedent: FlowNode;
|
1866 | }
|
1867 | export interface FlowCondition extends FlowNodeBase {
|
1868 | node: Expression;
|
1869 | antecedent: FlowNode;
|
1870 | }
|
1871 | export interface FlowSwitchClause extends FlowNodeBase {
|
1872 | switchStatement: SwitchStatement;
|
1873 | clauseStart: number;
|
1874 | clauseEnd: number;
|
1875 | antecedent: FlowNode;
|
1876 | }
|
1877 | export interface FlowArrayMutation extends FlowNodeBase {
|
1878 | node: CallExpression | BinaryExpression;
|
1879 | antecedent: FlowNode;
|
1880 | }
|
1881 | export interface FlowReduceLabel extends FlowNodeBase {
|
1882 | target: FlowLabel;
|
1883 | antecedents: FlowNode[];
|
1884 | antecedent: FlowNode;
|
1885 | }
|
1886 | export type FlowType = Type | IncompleteType;
|
1887 | export interface IncompleteType {
|
1888 | flags: TypeFlags;
|
1889 | type: Type;
|
1890 | }
|
1891 | export interface AmdDependency {
|
1892 | path: string;
|
1893 | name?: string;
|
1894 | }
|
1895 | export interface SourceFile extends Declaration {
|
1896 | readonly kind: SyntaxKind.SourceFile;
|
1897 | readonly statements: NodeArray<Statement>;
|
1898 | readonly endOfFileToken: Token<SyntaxKind.EndOfFileToken>;
|
1899 | fileName: string;
|
1900 | text: string;
|
1901 | amdDependencies: readonly AmdDependency[];
|
1902 | moduleName?: string;
|
1903 | referencedFiles: readonly FileReference[];
|
1904 | typeReferenceDirectives: readonly FileReference[];
|
1905 | libReferenceDirectives: readonly FileReference[];
|
1906 | languageVariant: LanguageVariant;
|
1907 | isDeclarationFile: boolean;
|
1908 | |
1909 |
|
1910 |
|
1911 |
|
1912 |
|
1913 |
|
1914 |
|
1915 |
|
1916 | hasNoDefaultLib: boolean;
|
1917 | languageVersion: ScriptTarget;
|
1918 | }
|
1919 | export interface Bundle extends Node {
|
1920 | readonly kind: SyntaxKind.Bundle;
|
1921 | readonly prepends: readonly (InputFiles | UnparsedSource)[];
|
1922 | readonly sourceFiles: readonly SourceFile[];
|
1923 | }
|
1924 | export interface InputFiles extends Node {
|
1925 | readonly kind: SyntaxKind.InputFiles;
|
1926 | javascriptPath?: string;
|
1927 | javascriptText: string;
|
1928 | javascriptMapPath?: string;
|
1929 | javascriptMapText?: string;
|
1930 | declarationPath?: string;
|
1931 | declarationText: string;
|
1932 | declarationMapPath?: string;
|
1933 | declarationMapText?: string;
|
1934 | }
|
1935 | export interface UnparsedSource extends Node {
|
1936 | readonly kind: SyntaxKind.UnparsedSource;
|
1937 | fileName: string;
|
1938 | text: string;
|
1939 | readonly prologues: readonly UnparsedPrologue[];
|
1940 | helpers: readonly UnscopedEmitHelper[] | undefined;
|
1941 | referencedFiles: readonly FileReference[];
|
1942 | typeReferenceDirectives: readonly string[] | undefined;
|
1943 | libReferenceDirectives: readonly FileReference[];
|
1944 | hasNoDefaultLib?: boolean;
|
1945 | sourceMapPath?: string;
|
1946 | sourceMapText?: string;
|
1947 | readonly syntheticReferences?: readonly UnparsedSyntheticReference[];
|
1948 | readonly texts: readonly UnparsedSourceText[];
|
1949 | }
|
1950 | export type UnparsedSourceText = UnparsedPrepend | UnparsedTextLike;
|
1951 | export type UnparsedNode = UnparsedPrologue | UnparsedSourceText | UnparsedSyntheticReference;
|
1952 | export interface UnparsedSection extends Node {
|
1953 | readonly kind: SyntaxKind;
|
1954 | readonly parent: UnparsedSource;
|
1955 | readonly data?: string;
|
1956 | }
|
1957 | export interface UnparsedPrologue extends UnparsedSection {
|
1958 | readonly kind: SyntaxKind.UnparsedPrologue;
|
1959 | readonly parent: UnparsedSource;
|
1960 | readonly data: string;
|
1961 | }
|
1962 | export interface UnparsedPrepend extends UnparsedSection {
|
1963 | readonly kind: SyntaxKind.UnparsedPrepend;
|
1964 | readonly parent: UnparsedSource;
|
1965 | readonly data: string;
|
1966 | readonly texts: readonly UnparsedTextLike[];
|
1967 | }
|
1968 | export interface UnparsedTextLike extends UnparsedSection {
|
1969 | readonly kind: SyntaxKind.UnparsedText | SyntaxKind.UnparsedInternalText;
|
1970 | readonly parent: UnparsedSource;
|
1971 | }
|
1972 | export interface UnparsedSyntheticReference extends UnparsedSection {
|
1973 | readonly kind: SyntaxKind.UnparsedSyntheticReference;
|
1974 | readonly parent: UnparsedSource;
|
1975 | }
|
1976 | export interface JsonSourceFile extends SourceFile {
|
1977 | readonly statements: NodeArray<JsonObjectExpressionStatement>;
|
1978 | }
|
1979 | export interface TsConfigSourceFile extends JsonSourceFile {
|
1980 | extendedSourceFiles?: string[];
|
1981 | }
|
1982 | export interface JsonMinusNumericLiteral extends PrefixUnaryExpression {
|
1983 | readonly kind: SyntaxKind.PrefixUnaryExpression;
|
1984 | readonly operator: SyntaxKind.MinusToken;
|
1985 | readonly operand: NumericLiteral;
|
1986 | }
|
1987 | export type JsonObjectExpression = ObjectLiteralExpression | ArrayLiteralExpression | JsonMinusNumericLiteral | NumericLiteral | StringLiteral | BooleanLiteral | NullLiteral;
|
1988 | export interface JsonObjectExpressionStatement extends ExpressionStatement {
|
1989 | readonly expression: JsonObjectExpression;
|
1990 | }
|
1991 | export interface ScriptReferenceHost {
|
1992 | getCompilerOptions(): CompilerOptions;
|
1993 | getSourceFile(fileName: string): SourceFile | undefined;
|
1994 | getSourceFileByPath(path: Path): SourceFile | undefined;
|
1995 | getCurrentDirectory(): string;
|
1996 | }
|
1997 | export interface ParseConfigHost {
|
1998 | useCaseSensitiveFileNames: boolean;
|
1999 | readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[];
|
2000 | |
2001 |
|
2002 |
|
2003 |
|
2004 | fileExists(path: string): boolean;
|
2005 | readFile(path: string): string | undefined;
|
2006 | trace?(s: string): void;
|
2007 | }
|
2008 | |
2009 |
|
2010 |
|
2011 |
|
2012 |
|
2013 | export type ResolvedConfigFileName = string & {
|
2014 | _isResolvedConfigFileName: never;
|
2015 | };
|
2016 | export type WriteFileCallback = (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[]) => void;
|
2017 | export class OperationCanceledException {
|
2018 | }
|
2019 | export interface CancellationToken {
|
2020 | isCancellationRequested(): boolean;
|
2021 |
|
2022 | throwIfCancellationRequested(): void;
|
2023 | }
|
2024 | export interface Program extends ScriptReferenceHost {
|
2025 | getCurrentDirectory(): string;
|
2026 | |
2027 |
|
2028 |
|
2029 | getRootFileNames(): readonly string[];
|
2030 | |
2031 |
|
2032 |
|
2033 | getSourceFiles(): readonly SourceFile[];
|
2034 | |
2035 |
|
2036 |
|
2037 |
|
2038 |
|
2039 |
|
2040 |
|
2041 |
|
2042 |
|
2043 |
|
2044 | emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult;
|
2045 | getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
|
2046 | getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
|
2047 | getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
|
2048 |
|
2049 | getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
|
2050 | getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
|
2051 | getConfigFileParsingDiagnostics(): readonly Diagnostic[];
|
2052 | |
2053 |
|
2054 |
|
2055 | getTypeChecker(): TypeChecker;
|
2056 | getNodeCount(): number;
|
2057 | getIdentifierCount(): number;
|
2058 | getSymbolCount(): number;
|
2059 | getTypeCount(): number;
|
2060 | getInstantiationCount(): number;
|
2061 | getRelationCacheSizes(): {
|
2062 | assignable: number;
|
2063 | identity: number;
|
2064 | subtype: number;
|
2065 | strictSubtype: number;
|
2066 | };
|
2067 | isSourceFileFromExternalLibrary(file: SourceFile): boolean;
|
2068 | isSourceFileDefaultLibrary(file: SourceFile): boolean;
|
2069 | getProjectReferences(): readonly ProjectReference[] | undefined;
|
2070 | getResolvedProjectReferences(): readonly (ResolvedProjectReference | undefined)[] | undefined;
|
2071 | }
|
2072 | export interface ResolvedProjectReference {
|
2073 | commandLine: ParsedCommandLine;
|
2074 | sourceFile: SourceFile;
|
2075 | references?: readonly (ResolvedProjectReference | undefined)[];
|
2076 | }
|
2077 | export type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer;
|
2078 | export interface CustomTransformer {
|
2079 | transformSourceFile(node: SourceFile): SourceFile;
|
2080 | transformBundle(node: Bundle): Bundle;
|
2081 | }
|
2082 | export interface CustomTransformers {
|
2083 |
|
2084 | before?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[];
|
2085 |
|
2086 | after?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[];
|
2087 |
|
2088 | afterDeclarations?: (TransformerFactory<Bundle | SourceFile> | CustomTransformerFactory)[];
|
2089 | }
|
2090 | export interface SourceMapSpan {
|
2091 |
|
2092 | emittedLine: number;
|
2093 |
|
2094 | emittedColumn: number;
|
2095 |
|
2096 | sourceLine: number;
|
2097 |
|
2098 | sourceColumn: number;
|
2099 |
|
2100 | nameIndex?: number;
|
2101 |
|
2102 | sourceIndex: number;
|
2103 | }
|
2104 |
|
2105 | export enum ExitStatus {
|
2106 | Success = 0,
|
2107 | DiagnosticsPresent_OutputsSkipped = 1,
|
2108 | DiagnosticsPresent_OutputsGenerated = 2,
|
2109 | InvalidProject_OutputsSkipped = 3,
|
2110 | ProjectReferenceCycle_OutputsSkipped = 4,
|
2111 |
|
2112 | ProjectReferenceCycle_OutputsSkupped = 4
|
2113 | }
|
2114 | export interface EmitResult {
|
2115 | emitSkipped: boolean;
|
2116 |
|
2117 | diagnostics: readonly Diagnostic[];
|
2118 | emittedFiles?: string[];
|
2119 | }
|
2120 | export interface TypeChecker {
|
2121 | getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
|
2122 | getDeclaredTypeOfSymbol(symbol: Symbol): Type;
|
2123 | getPropertiesOfType(type: Type): Symbol[];
|
2124 | getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
|
2125 | getPrivateIdentifierPropertyOfType(leftType: Type, name: string, location: Node): Symbol | undefined;
|
2126 | getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined;
|
2127 | getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[];
|
2128 | getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
|
2129 | getBaseTypes(type: InterfaceType): BaseType[];
|
2130 | getBaseTypeOfLiteralType(type: Type): Type;
|
2131 | getWidenedType(type: Type): Type;
|
2132 | getReturnTypeOfSignature(signature: Signature): Type;
|
2133 | getNullableType(type: Type, flags: TypeFlags): Type;
|
2134 | getNonNullableType(type: Type): Type;
|
2135 | getTypeArguments(type: TypeReference): readonly Type[];
|
2136 |
|
2137 | typeToTypeNode(type: Type, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeNode | undefined;
|
2138 |
|
2139 | signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): SignatureDeclaration & {
|
2140 | typeArguments?: NodeArray<TypeNode>;
|
2141 | } | undefined;
|
2142 |
|
2143 | indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, kind: IndexKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined;
|
2144 |
|
2145 | symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): EntityName | undefined;
|
2146 |
|
2147 | symbolToExpression(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): Expression | undefined;
|
2148 |
|
2149 | symbolToTypeParameterDeclarations(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): NodeArray<TypeParameterDeclaration> | undefined;
|
2150 |
|
2151 | symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): ParameterDeclaration | undefined;
|
2152 |
|
2153 | typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeParameterDeclaration | undefined;
|
2154 | getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
|
2155 | getSymbolAtLocation(node: Node): Symbol | undefined;
|
2156 | getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
|
2157 | |
2158 |
|
2159 |
|
2160 |
|
2161 | getShorthandAssignmentValueSymbol(location: Node): Symbol | undefined;
|
2162 | getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol | undefined;
|
2163 | |
2164 |
|
2165 |
|
2166 |
|
2167 |
|
2168 |
|
2169 |
|
2170 |
|
2171 | getExportSymbolOfSymbol(symbol: Symbol): Symbol;
|
2172 | getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol | undefined;
|
2173 | getTypeOfAssignmentPattern(pattern: AssignmentPattern): Type;
|
2174 | getTypeAtLocation(node: Node): Type;
|
2175 | getTypeFromTypeNode(node: TypeNode): Type;
|
2176 | signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string;
|
2177 | typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
|
2178 | symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): string;
|
2179 | typePredicateToString(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
|
2180 | getFullyQualifiedName(symbol: Symbol): string;
|
2181 | getAugmentedPropertiesOfType(type: Type): Symbol[];
|
2182 | getRootSymbols(symbol: Symbol): readonly Symbol[];
|
2183 | getContextualType(node: Expression): Type | undefined;
|
2184 | |
2185 |
|
2186 |
|
2187 |
|
2188 |
|
2189 | getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined;
|
2190 | getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined;
|
2191 | isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined;
|
2192 | isUndefinedSymbol(symbol: Symbol): boolean;
|
2193 | isArgumentsSymbol(symbol: Symbol): boolean;
|
2194 | isUnknownSymbol(symbol: Symbol): boolean;
|
2195 | getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined;
|
2196 | isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName | ImportTypeNode, propertyName: string): boolean;
|
2197 |
|
2198 | getAliasedSymbol(symbol: Symbol): Symbol;
|
2199 | getExportsOfModule(moduleSymbol: Symbol): Symbol[];
|
2200 | getJsxIntrinsicTagNamesAt(location: Node): Symbol[];
|
2201 | isOptionalParameter(node: ParameterDeclaration): boolean;
|
2202 | getAmbientModules(): Symbol[];
|
2203 | tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
|
2204 | getApparentType(type: Type): Type;
|
2205 | getBaseConstraintOfType(type: Type): Type | undefined;
|
2206 | getDefaultFromTypeParameter(type: Type): Type | undefined;
|
2207 | |
2208 |
|
2209 |
|
2210 |
|
2211 |
|
2212 | runWithCancellationToken<T>(token: CancellationToken, cb: (checker: TypeChecker) => T): T;
|
2213 | }
|
2214 | export enum NodeBuilderFlags {
|
2215 | None = 0,
|
2216 | NoTruncation = 1,
|
2217 | WriteArrayAsGenericType = 2,
|
2218 | GenerateNamesForShadowedTypeParams = 4,
|
2219 | UseStructuralFallback = 8,
|
2220 | ForbidIndexedAccessSymbolReferences = 16,
|
2221 | WriteTypeArgumentsOfSignature = 32,
|
2222 | UseFullyQualifiedType = 64,
|
2223 | UseOnlyExternalAliasing = 128,
|
2224 | SuppressAnyReturnType = 256,
|
2225 | WriteTypeParametersInQualifiedName = 512,
|
2226 | MultilineObjectLiterals = 1024,
|
2227 | WriteClassExpressionAsTypeLiteral = 2048,
|
2228 | UseTypeOfFunction = 4096,
|
2229 | OmitParameterModifiers = 8192,
|
2230 | UseAliasDefinedOutsideCurrentScope = 16384,
|
2231 | UseSingleQuotesForStringLiteralType = 268435456,
|
2232 | NoTypeReduction = 536870912,
|
2233 | NoUndefinedOptionalParameterType = 1073741824,
|
2234 | AllowThisInObjectLiteral = 32768,
|
2235 | AllowQualifedNameInPlaceOfIdentifier = 65536,
|
2236 | AllowAnonymousIdentifier = 131072,
|
2237 | AllowEmptyUnionOrIntersection = 262144,
|
2238 | AllowEmptyTuple = 524288,
|
2239 | AllowUniqueESSymbolType = 1048576,
|
2240 | AllowEmptyIndexInfoType = 2097152,
|
2241 | AllowNodeModulesRelativePaths = 67108864,
|
2242 | IgnoreErrors = 70221824,
|
2243 | InObjectTypeLiteral = 4194304,
|
2244 | InTypeAlias = 8388608,
|
2245 | InInitialEntityName = 16777216,
|
2246 | InReverseMappedType = 33554432
|
2247 | }
|
2248 | export enum TypeFormatFlags {
|
2249 | None = 0,
|
2250 | NoTruncation = 1,
|
2251 | WriteArrayAsGenericType = 2,
|
2252 | UseStructuralFallback = 8,
|
2253 | WriteTypeArgumentsOfSignature = 32,
|
2254 | UseFullyQualifiedType = 64,
|
2255 | SuppressAnyReturnType = 256,
|
2256 | MultilineObjectLiterals = 1024,
|
2257 | WriteClassExpressionAsTypeLiteral = 2048,
|
2258 | UseTypeOfFunction = 4096,
|
2259 | OmitParameterModifiers = 8192,
|
2260 | UseAliasDefinedOutsideCurrentScope = 16384,
|
2261 | UseSingleQuotesForStringLiteralType = 268435456,
|
2262 | NoTypeReduction = 536870912,
|
2263 | AllowUniqueESSymbolType = 1048576,
|
2264 | AddUndefined = 131072,
|
2265 | WriteArrowStyleSignature = 262144,
|
2266 | InArrayType = 524288,
|
2267 | InElementType = 2097152,
|
2268 | InFirstTypeArgument = 4194304,
|
2269 | InTypeAlias = 8388608,
|
2270 | /** @deprecated */ WriteOwnNameForAnyLike = 0,
|
2271 | NodeBuilderFlagsMask = 814775659
|
2272 | }
|
2273 | export enum SymbolFormatFlags {
|
2274 | None = 0,
|
2275 | WriteTypeParametersOrArguments = 1,
|
2276 | UseOnlyExternalAliasing = 2,
|
2277 | AllowAnyNodeKind = 4,
|
2278 | UseAliasDefinedOutsideCurrentScope = 8,
|
2279 | }
|
2280 | export enum TypePredicateKind {
|
2281 | This = 0,
|
2282 | Identifier = 1,
|
2283 | AssertsThis = 2,
|
2284 | AssertsIdentifier = 3
|
2285 | }
|
2286 | export interface TypePredicateBase {
|
2287 | kind: TypePredicateKind;
|
2288 | type: Type | undefined;
|
2289 | }
|
2290 | export interface ThisTypePredicate extends TypePredicateBase {
|
2291 | kind: TypePredicateKind.This;
|
2292 | parameterName: undefined;
|
2293 | parameterIndex: undefined;
|
2294 | type: Type;
|
2295 | }
|
2296 | export interface IdentifierTypePredicate extends TypePredicateBase {
|
2297 | kind: TypePredicateKind.Identifier;
|
2298 | parameterName: string;
|
2299 | parameterIndex: number;
|
2300 | type: Type;
|
2301 | }
|
2302 | export interface AssertsThisTypePredicate extends TypePredicateBase {
|
2303 | kind: TypePredicateKind.AssertsThis;
|
2304 | parameterName: undefined;
|
2305 | parameterIndex: undefined;
|
2306 | type: Type | undefined;
|
2307 | }
|
2308 | export interface AssertsIdentifierTypePredicate extends TypePredicateBase {
|
2309 | kind: TypePredicateKind.AssertsIdentifier;
|
2310 | parameterName: string;
|
2311 | parameterIndex: number;
|
2312 | type: Type | undefined;
|
2313 | }
|
2314 | export type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate;
|
2315 | export enum SymbolFlags {
|
2316 | None = 0,
|
2317 | FunctionScopedVariable = 1,
|
2318 | BlockScopedVariable = 2,
|
2319 | Property = 4,
|
2320 | EnumMember = 8,
|
2321 | Function = 16,
|
2322 | Class = 32,
|
2323 | Interface = 64,
|
2324 | ConstEnum = 128,
|
2325 | RegularEnum = 256,
|
2326 | ValueModule = 512,
|
2327 | NamespaceModule = 1024,
|
2328 | TypeLiteral = 2048,
|
2329 | ObjectLiteral = 4096,
|
2330 | Method = 8192,
|
2331 | Constructor = 16384,
|
2332 | GetAccessor = 32768,
|
2333 | SetAccessor = 65536,
|
2334 | Signature = 131072,
|
2335 | TypeParameter = 262144,
|
2336 | TypeAlias = 524288,
|
2337 | ExportValue = 1048576,
|
2338 | Alias = 2097152,
|
2339 | Prototype = 4194304,
|
2340 | ExportStar = 8388608,
|
2341 | Optional = 16777216,
|
2342 | Transient = 33554432,
|
2343 | Assignment = 67108864,
|
2344 | ModuleExports = 134217728,
|
2345 | Enum = 384,
|
2346 | Variable = 3,
|
2347 | Value = 111551,
|
2348 | Type = 788968,
|
2349 | Namespace = 1920,
|
2350 | Module = 1536,
|
2351 | Accessor = 98304,
|
2352 | FunctionScopedVariableExcludes = 111550,
|
2353 | BlockScopedVariableExcludes = 111551,
|
2354 | ParameterExcludes = 111551,
|
2355 | PropertyExcludes = 0,
|
2356 | EnumMemberExcludes = 900095,
|
2357 | FunctionExcludes = 110991,
|
2358 | ClassExcludes = 899503,
|
2359 | InterfaceExcludes = 788872,
|
2360 | RegularEnumExcludes = 899327,
|
2361 | ConstEnumExcludes = 899967,
|
2362 | ValueModuleExcludes = 110735,
|
2363 | NamespaceModuleExcludes = 0,
|
2364 | MethodExcludes = 103359,
|
2365 | GetAccessorExcludes = 46015,
|
2366 | SetAccessorExcludes = 78783,
|
2367 | TypeParameterExcludes = 526824,
|
2368 | TypeAliasExcludes = 788968,
|
2369 | AliasExcludes = 2097152,
|
2370 | ModuleMember = 2623475,
|
2371 | ExportHasLocal = 944,
|
2372 | BlockScoped = 418,
|
2373 | PropertyOrAccessor = 98308,
|
2374 | ClassMember = 106500,
|
2375 | }
|
2376 | export interface Symbol {
|
2377 | flags: SymbolFlags;
|
2378 | escapedName: __String;
|
2379 | declarations: Declaration[];
|
2380 | valueDeclaration: Declaration;
|
2381 | members?: SymbolTable;
|
2382 | exports?: SymbolTable;
|
2383 | globalExports?: SymbolTable;
|
2384 | }
|
2385 | export enum InternalSymbolName {
|
2386 | Call = "__call",
|
2387 | Constructor = "__constructor",
|
2388 | New = "__new",
|
2389 | Index = "__index",
|
2390 | ExportStar = "__export",
|
2391 | Global = "__global",
|
2392 | Missing = "__missing",
|
2393 | Type = "__type",
|
2394 | Object = "__object",
|
2395 | JSXAttributes = "__jsxAttributes",
|
2396 | Class = "__class",
|
2397 | Function = "__function",
|
2398 | Computed = "__computed",
|
2399 | Resolving = "__resolving__",
|
2400 | ExportEquals = "export=",
|
2401 | Default = "default",
|
2402 | This = "this"
|
2403 | }
|
2404 | /**
|
2405 | * This represents a string whose leading underscore have been escaped by adding extra leading underscores.
|
2406 | * The shape of this brand is rather unique compared to others we've used.
|
2407 | * Instead of just an intersection of a string and an object, it is that union-ed
|
2408 | * with an intersection of void and an object. This makes it wholly incompatible
|
2409 | * with a normal string (which is good, it cannot be misused on assignment or on usage),
|
2410 | * while still being comparable with a normal string via === (also good) and castable from a string.
|
2411 | */
|
2412 | export type __String = (string & {
|
2413 | __escapedIdentifier: void;
|
2414 | }) | (void & {
|
2415 | __escapedIdentifier: void;
|
2416 | }) | InternalSymbolName;
|
2417 | /** ReadonlyMap where keys are `__String`s. */
|
2418 | export interface ReadonlyUnderscoreEscapedMap<T> extends ReadonlyESMap<__String, T> {
|
2419 | }
|
2420 | /** Map where keys are `__String`s. */
|
2421 | export interface UnderscoreEscapedMap<T> extends ESMap<__String, T>, ReadonlyUnderscoreEscapedMap<T> {
|
2422 | }
|
2423 | /** SymbolTable based on ES6 Map interface. */
|
2424 | export type SymbolTable = UnderscoreEscapedMap<Symbol>;
|
2425 | export enum TypeFlags {
|
2426 | Any = 1,
|
2427 | Unknown = 2,
|
2428 | String = 4,
|
2429 | Number = 8,
|
2430 | Boolean = 16,
|
2431 | Enum = 32,
|
2432 | BigInt = 64,
|
2433 | StringLiteral = 128,
|
2434 | NumberLiteral = 256,
|
2435 | BooleanLiteral = 512,
|
2436 | EnumLiteral = 1024,
|
2437 | BigIntLiteral = 2048,
|
2438 | ESSymbol = 4096,
|
2439 | UniqueESSymbol = 8192,
|
2440 | Void = 16384,
|
2441 | Undefined = 32768,
|
2442 | Null = 65536,
|
2443 | Never = 131072,
|
2444 | TypeParameter = 262144,
|
2445 | Object = 524288,
|
2446 | Union = 1048576,
|
2447 | Intersection = 2097152,
|
2448 | Index = 4194304,
|
2449 | IndexedAccess = 8388608,
|
2450 | Conditional = 16777216,
|
2451 | Substitution = 33554432,
|
2452 | NonPrimitive = 67108864,
|
2453 | Literal = 2944,
|
2454 | Unit = 109440,
|
2455 | StringOrNumberLiteral = 384,
|
2456 | PossiblyFalsy = 117724,
|
2457 | StringLike = 132,
|
2458 | NumberLike = 296,
|
2459 | BigIntLike = 2112,
|
2460 | BooleanLike = 528,
|
2461 | EnumLike = 1056,
|
2462 | ESSymbolLike = 12288,
|
2463 | VoidLike = 49152,
|
2464 | UnionOrIntersection = 3145728,
|
2465 | StructuredType = 3670016,
|
2466 | TypeVariable = 8650752,
|
2467 | InstantiableNonPrimitive = 58982400,
|
2468 | InstantiablePrimitive = 4194304,
|
2469 | Instantiable = 63176704,
|
2470 | StructuredOrInstantiable = 66846720,
|
2471 | Narrowable = 133970943,
|
2472 | }
|
2473 | export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
|
2474 | export interface Type {
|
2475 | flags: TypeFlags;
|
2476 | symbol: Symbol;
|
2477 | pattern?: DestructuringPattern;
|
2478 | aliasSymbol?: Symbol;
|
2479 | aliasTypeArguments?: readonly Type[];
|
2480 | }
|
2481 | export interface LiteralType extends Type {
|
2482 | value: string | number | PseudoBigInt;
|
2483 | freshType: LiteralType;
|
2484 | regularType: LiteralType;
|
2485 | }
|
2486 | export interface UniqueESSymbolType extends Type {
|
2487 | symbol: Symbol;
|
2488 | escapedName: __String;
|
2489 | }
|
2490 | export interface StringLiteralType extends LiteralType {
|
2491 | value: string;
|
2492 | }
|
2493 | export interface NumberLiteralType extends LiteralType {
|
2494 | value: number;
|
2495 | }
|
2496 | export interface BigIntLiteralType extends LiteralType {
|
2497 | value: PseudoBigInt;
|
2498 | }
|
2499 | export interface EnumType extends Type {
|
2500 | }
|
2501 | export enum ObjectFlags {
|
2502 | Class = 1,
|
2503 | Interface = 2,
|
2504 | Reference = 4,
|
2505 | Tuple = 8,
|
2506 | Anonymous = 16,
|
2507 | Mapped = 32,
|
2508 | Instantiated = 64,
|
2509 | ObjectLiteral = 128,
|
2510 | EvolvingArray = 256,
|
2511 | ObjectLiteralPatternWithComputedProperties = 512,
|
2512 | ContainsSpread = 1024,
|
2513 | ReverseMapped = 2048,
|
2514 | JsxAttributes = 4096,
|
2515 | MarkerType = 8192,
|
2516 | JSLiteral = 16384,
|
2517 | FreshLiteral = 32768,
|
2518 | ArrayLiteral = 65536,
|
2519 | ObjectRestType = 131072,
|
2520 | ClassOrInterface = 3,
|
2521 | }
|
2522 | export interface ObjectType extends Type {
|
2523 | objectFlags: ObjectFlags;
|
2524 | }
|
2525 | /** Class and interface types (ObjectFlags.Class and ObjectFlags.Interface). */
|
2526 | export interface InterfaceType extends ObjectType {
|
2527 | typeParameters: TypeParameter[] | undefined;
|
2528 | outerTypeParameters: TypeParameter[] | undefined;
|
2529 | localTypeParameters: TypeParameter[] | undefined;
|
2530 | thisType: TypeParameter | undefined;
|
2531 | }
|
2532 | export type BaseType = ObjectType | IntersectionType | TypeVariable;
|
2533 | export interface InterfaceTypeWithDeclaredMembers extends InterfaceType {
|
2534 | declaredProperties: Symbol[];
|
2535 | declaredCallSignatures: Signature[];
|
2536 | declaredConstructSignatures: Signature[];
|
2537 | declaredStringIndexInfo?: IndexInfo;
|
2538 | declaredNumberIndexInfo?: IndexInfo;
|
2539 | }
|
2540 | /**
|
2541 | * Type references (ObjectFlags.Reference). When a class or interface has type parameters or
|
2542 | * a "this" type, references to the class or interface are made using type references. The
|
2543 | * typeArguments property specifies the types to substitute for the type parameters of the
|
2544 | * class or interface and optionally includes an extra element that specifies the type to
|
2545 | * substitute for "this" in the resulting instantiation. When no extra argument is present,
|
2546 | * the type reference itself is substituted for "this". The typeArguments property is undefined
|
2547 | * if the class or interface has no type parameters and the reference isn't specifying an
|
2548 | * explicit "this" argument.
|
2549 | */
|
2550 | export interface TypeReference extends ObjectType {
|
2551 | target: GenericType;
|
2552 | node?: TypeReferenceNode | ArrayTypeNode | TupleTypeNode;
|
2553 | }
|
2554 | export interface DeferredTypeReference extends TypeReference {
|
2555 | }
|
2556 | export interface GenericType extends InterfaceType, TypeReference {
|
2557 | }
|
2558 | export enum ElementFlags {
|
2559 | Required = 1,
|
2560 | Optional = 2,
|
2561 | Rest = 4,
|
2562 | Variadic = 8,
|
2563 | Variable = 12
|
2564 | }
|
2565 | export interface TupleType extends GenericType {
|
2566 | elementFlags: readonly ElementFlags[];
|
2567 | minLength: number;
|
2568 | fixedLength: number;
|
2569 | hasRestElement: boolean;
|
2570 | combinedFlags: ElementFlags;
|
2571 | readonly: boolean;
|
2572 | labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[];
|
2573 | }
|
2574 | export interface TupleTypeReference extends TypeReference {
|
2575 | target: TupleType;
|
2576 | }
|
2577 | export interface UnionOrIntersectionType extends Type {
|
2578 | types: Type[];
|
2579 | }
|
2580 | export interface UnionType extends UnionOrIntersectionType {
|
2581 | }
|
2582 | export interface IntersectionType extends UnionOrIntersectionType {
|
2583 | }
|
2584 | export type StructuredType = ObjectType | UnionType | IntersectionType;
|
2585 | export interface EvolvingArrayType extends ObjectType {
|
2586 | elementType: Type;
|
2587 | finalArrayType?: Type;
|
2588 | }
|
2589 | export interface InstantiableType extends Type {
|
2590 | }
|
2591 | export interface TypeParameter extends InstantiableType {
|
2592 | }
|
2593 | export interface IndexedAccessType extends InstantiableType {
|
2594 | objectType: Type;
|
2595 | indexType: Type;
|
2596 | constraint?: Type;
|
2597 | simplifiedForReading?: Type;
|
2598 | simplifiedForWriting?: Type;
|
2599 | }
|
2600 | export type TypeVariable = TypeParameter | IndexedAccessType;
|
2601 | export interface IndexType extends InstantiableType {
|
2602 | type: InstantiableType | UnionOrIntersectionType;
|
2603 | }
|
2604 | export interface ConditionalRoot {
|
2605 | node: ConditionalTypeNode;
|
2606 | checkType: Type;
|
2607 | extendsType: Type;
|
2608 | trueType: Type;
|
2609 | falseType: Type;
|
2610 | isDistributive: boolean;
|
2611 | inferTypeParameters?: TypeParameter[];
|
2612 | outerTypeParameters?: TypeParameter[];
|
2613 | instantiations?: Map<Type>;
|
2614 | aliasSymbol?: Symbol;
|
2615 | aliasTypeArguments?: Type[];
|
2616 | }
|
2617 | export interface ConditionalType extends InstantiableType {
|
2618 | root: ConditionalRoot;
|
2619 | checkType: Type;
|
2620 | extendsType: Type;
|
2621 | resolvedTrueType: Type;
|
2622 | resolvedFalseType: Type;
|
2623 | }
|
2624 | export interface SubstitutionType extends InstantiableType {
|
2625 | baseType: Type;
|
2626 | substitute: Type;
|
2627 | }
|
2628 | export enum SignatureKind {
|
2629 | Call = 0,
|
2630 | Construct = 1
|
2631 | }
|
2632 | export interface Signature {
|
2633 | declaration?: SignatureDeclaration | JSDocSignature;
|
2634 | typeParameters?: readonly TypeParameter[];
|
2635 | parameters: readonly Symbol[];
|
2636 | }
|
2637 | export enum IndexKind {
|
2638 | String = 0,
|
2639 | Number = 1
|
2640 | }
|
2641 | export interface IndexInfo {
|
2642 | type: Type;
|
2643 | isReadonly: boolean;
|
2644 | declaration?: IndexSignatureDeclaration;
|
2645 | }
|
2646 | export enum InferencePriority {
|
2647 | NakedTypeVariable = 1,
|
2648 | SpeculativeTuple = 2,
|
2649 | HomomorphicMappedType = 4,
|
2650 | PartialHomomorphicMappedType = 8,
|
2651 | MappedTypeConstraint = 16,
|
2652 | ContravariantConditional = 32,
|
2653 | ReturnType = 64,
|
2654 | LiteralKeyof = 128,
|
2655 | NoConstraints = 256,
|
2656 | AlwaysStrict = 512,
|
2657 | MaxValue = 1024,
|
2658 | PriorityImpliesCombination = 208,
|
2659 | Circularity = -1
|
2660 | }
|
2661 | /** @deprecated Use FileExtensionInfo instead. */
|
2662 | export type JsFileExtensionInfo = FileExtensionInfo;
|
2663 | export interface FileExtensionInfo {
|
2664 | extension: string;
|
2665 | isMixedContent: boolean;
|
2666 | scriptKind?: ScriptKind;
|
2667 | }
|
2668 | export interface DiagnosticMessage {
|
2669 | key: string;
|
2670 | category: DiagnosticCategory;
|
2671 | code: number;
|
2672 | message: string;
|
2673 | reportsUnnecessary?: {};
|
2674 | reportsDeprecated?: {};
|
2675 | }
|
2676 | /**
|
2677 | * A linked list of formatted diagnostic messages to be used as part of a multiline message.
|
2678 | * It is built from the bottom up, leaving the head to be the "main" diagnostic.
|
2679 | * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage,
|
2680 | * the difference is that messages are all preformatted in DMC.
|
2681 | */
|
2682 | export interface DiagnosticMessageChain {
|
2683 | messageText: string;
|
2684 | category: DiagnosticCategory;
|
2685 | code: number;
|
2686 | next?: DiagnosticMessageChain[];
|
2687 | }
|
2688 | export interface Diagnostic extends DiagnosticRelatedInformation {
|
2689 | /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
|
2690 | reportsUnnecessary?: {};
|
2691 | reportsDeprecated?: {};
|
2692 | source?: string;
|
2693 | relatedInformation?: DiagnosticRelatedInformation[];
|
2694 | }
|
2695 | export interface DiagnosticRelatedInformation {
|
2696 | category: DiagnosticCategory;
|
2697 | code: number;
|
2698 | file: SourceFile | undefined;
|
2699 | start: number | undefined;
|
2700 | length: number | undefined;
|
2701 | messageText: string | DiagnosticMessageChain;
|
2702 | }
|
2703 | export interface DiagnosticWithLocation extends Diagnostic {
|
2704 | file: SourceFile;
|
2705 | start: number;
|
2706 | length: number;
|
2707 | }
|
2708 | export enum DiagnosticCategory {
|
2709 | Warning = 0,
|
2710 | Error = 1,
|
2711 | Suggestion = 2,
|
2712 | Message = 3
|
2713 | }
|
2714 | export enum ModuleResolutionKind {
|
2715 | Classic = 1,
|
2716 | NodeJs = 2
|
2717 | }
|
2718 | export interface PluginImport {
|
2719 | name: string;
|
2720 | }
|
2721 | export interface ProjectReference {
|
2722 | /** A normalized path on disk */
|
2723 | path: string;
|
2724 | /** The path as the user originally wrote it */
|
2725 | originalPath?: string;
|
2726 | /** True if the output of this reference should be prepended to the output of this project. Only valid for --outFile compilations */
|
2727 | prepend?: boolean;
|
2728 | /** True if it is intended that this reference form a circularity */
|
2729 | circular?: boolean;
|
2730 | }
|
2731 | export enum WatchFileKind {
|
2732 | FixedPollingInterval = 0,
|
2733 | PriorityPollingInterval = 1,
|
2734 | DynamicPriorityPolling = 2,
|
2735 | UseFsEvents = 3,
|
2736 | UseFsEventsOnParentDirectory = 4
|
2737 | }
|
2738 | export enum WatchDirectoryKind {
|
2739 | UseFsEvents = 0,
|
2740 | FixedPollingInterval = 1,
|
2741 | DynamicPriorityPolling = 2
|
2742 | }
|
2743 | export enum PollingWatchKind {
|
2744 | FixedInterval = 0,
|
2745 | PriorityInterval = 1,
|
2746 | DynamicPriority = 2
|
2747 | }
|
2748 | export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined;
|
2749 | export interface CompilerOptions {
|
2750 | allowJs?: boolean;
|
2751 | allowSyntheticDefaultImports?: boolean;
|
2752 | allowUmdGlobalAccess?: boolean;
|
2753 | allowUnreachableCode?: boolean;
|
2754 | allowUnusedLabels?: boolean;
|
2755 | alwaysStrict?: boolean;
|
2756 | baseUrl?: string;
|
2757 | charset?: string;
|
2758 | checkJs?: boolean;
|
2759 | declaration?: boolean;
|
2760 | declarationMap?: boolean;
|
2761 | emitDeclarationOnly?: boolean;
|
2762 | declarationDir?: string;
|
2763 | disableSizeLimit?: boolean;
|
2764 | disableSourceOfProjectReferenceRedirect?: boolean;
|
2765 | disableSolutionSearching?: boolean;
|
2766 | disableReferencedProjectLoad?: boolean;
|
2767 | downlevelIteration?: boolean;
|
2768 | emitBOM?: boolean;
|
2769 | emitDecoratorMetadata?: boolean;
|
2770 | experimentalDecorators?: boolean;
|
2771 | forceConsistentCasingInFileNames?: boolean;
|
2772 | importHelpers?: boolean;
|
2773 | importsNotUsedAsValues?: ImportsNotUsedAsValues;
|
2774 | inlineSourceMap?: boolean;
|
2775 | inlineSources?: boolean;
|
2776 | isolatedModules?: boolean;
|
2777 | jsx?: JsxEmit;
|
2778 | keyofStringsOnly?: boolean;
|
2779 | lib?: string[];
|
2780 | locale?: string;
|
2781 | mapRoot?: string;
|
2782 | maxNodeModuleJsDepth?: number;
|
2783 | module?: ModuleKind;
|
2784 | moduleResolution?: ModuleResolutionKind;
|
2785 | newLine?: NewLineKind;
|
2786 | noEmit?: boolean;
|
2787 | noEmitHelpers?: boolean;
|
2788 | noEmitOnError?: boolean;
|
2789 | noErrorTruncation?: boolean;
|
2790 | noFallthroughCasesInSwitch?: boolean;
|
2791 | noImplicitAny?: boolean;
|
2792 | noImplicitReturns?: boolean;
|
2793 | noImplicitThis?: boolean;
|
2794 | noStrictGenericChecks?: boolean;
|
2795 | noUnusedLocals?: boolean;
|
2796 | noUnusedParameters?: boolean;
|
2797 | noImplicitUseStrict?: boolean;
|
2798 | assumeChangesOnlyAffectDirectDependencies?: boolean;
|
2799 | noLib?: boolean;
|
2800 | noResolve?: boolean;
|
2801 | out?: string;
|
2802 | outDir?: string;
|
2803 | outFile?: string;
|
2804 | paths?: MapLike<string[]>;
|
2805 | preserveConstEnums?: boolean;
|
2806 | preserveSymlinks?: boolean;
|
2807 | project?: string;
|
2808 | reactNamespace?: string;
|
2809 | jsxFactory?: string;
|
2810 | jsxFragmentFactory?: string;
|
2811 | composite?: boolean;
|
2812 | incremental?: boolean;
|
2813 | tsBuildInfoFile?: string;
|
2814 | removeComments?: boolean;
|
2815 | rootDir?: string;
|
2816 | rootDirs?: string[];
|
2817 | skipLibCheck?: boolean;
|
2818 | skipDefaultLibCheck?: boolean;
|
2819 | sourceMap?: boolean;
|
2820 | sourceRoot?: string;
|
2821 | strict?: boolean;
|
2822 | strictFunctionTypes?: boolean;
|
2823 | strictBindCallApply?: boolean;
|
2824 | strictNullChecks?: boolean;
|
2825 | strictPropertyInitialization?: boolean;
|
2826 | stripInternal?: boolean;
|
2827 | suppressExcessPropertyErrors?: boolean;
|
2828 | suppressImplicitAnyIndexErrors?: boolean;
|
2829 | target?: ScriptTarget;
|
2830 | traceResolution?: boolean;
|
2831 | resolveJsonModule?: boolean;
|
2832 | types?: string[];
|
2833 | /** Paths used to compute primary types search locations */
|
2834 | typeRoots?: string[];
|
2835 | esModuleInterop?: boolean;
|
2836 | useDefineForClassFields?: boolean;
|
2837 | [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined;
|
2838 | }
|
2839 | export interface WatchOptions {
|
2840 | watchFile?: WatchFileKind;
|
2841 | watchDirectory?: WatchDirectoryKind;
|
2842 | fallbackPolling?: PollingWatchKind;
|
2843 | synchronousWatchDirectory?: boolean;
|
2844 | [option: string]: CompilerOptionsValue | undefined;
|
2845 | }
|
2846 | export interface TypeAcquisition {
|
2847 | /**
|
2848 | * @deprecated typingOptions.enableAutoDiscovery
|
2849 | * Use typeAcquisition.enable instead.
|
2850 | */
|
2851 | enableAutoDiscovery?: boolean;
|
2852 | enable?: boolean;
|
2853 | include?: string[];
|
2854 | exclude?: string[];
|
2855 | [option: string]: string[] | boolean | undefined;
|
2856 | }
|
2857 | export enum ModuleKind {
|
2858 | None = 0,
|
2859 | CommonJS = 1,
|
2860 | AMD = 2,
|
2861 | UMD = 3,
|
2862 | System = 4,
|
2863 | ES2015 = 5,
|
2864 | ES2020 = 6,
|
2865 | ESNext = 99
|
2866 | }
|
2867 | export enum JsxEmit {
|
2868 | None = 0,
|
2869 | Preserve = 1,
|
2870 | React = 2,
|
2871 | ReactNative = 3
|
2872 | }
|
2873 | export enum ImportsNotUsedAsValues {
|
2874 | Remove = 0,
|
2875 | Preserve = 1,
|
2876 | Error = 2
|
2877 | }
|
2878 | export enum NewLineKind {
|
2879 | CarriageReturnLineFeed = 0,
|
2880 | LineFeed = 1
|
2881 | }
|
2882 | export interface LineAndCharacter {
|
2883 | /** 0-based. */
|
2884 | line: number;
|
2885 | character: number;
|
2886 | }
|
2887 | export enum ScriptKind {
|
2888 | Unknown = 0,
|
2889 | JS = 1,
|
2890 | JSX = 2,
|
2891 | TS = 3,
|
2892 | TSX = 4,
|
2893 | External = 5,
|
2894 | JSON = 6,
|
2895 | /**
|
2896 | * Used on extensions that doesn't define the ScriptKind but the content defines it.
|
2897 | * Deferred extensions are going to be included in all project contexts.
|
2898 | */
|
2899 | Deferred = 7
|
2900 | }
|
2901 | export enum ScriptTarget {
|
2902 | ES3 = 0,
|
2903 | ES5 = 1,
|
2904 | ES2015 = 2,
|
2905 | ES2016 = 3,
|
2906 | ES2017 = 4,
|
2907 | ES2018 = 5,
|
2908 | ES2019 = 6,
|
2909 | ES2020 = 7,
|
2910 | ESNext = 99,
|
2911 | JSON = 100,
|
2912 | Latest = 99
|
2913 | }
|
2914 | export enum LanguageVariant {
|
2915 | Standard = 0,
|
2916 | JSX = 1
|
2917 | }
|
2918 | /** Either a parsed command line or a parsed tsconfig.json */
|
2919 | export interface ParsedCommandLine {
|
2920 | options: CompilerOptions;
|
2921 | typeAcquisition?: TypeAcquisition;
|
2922 | fileNames: string[];
|
2923 | projectReferences?: readonly ProjectReference[];
|
2924 | watchOptions?: WatchOptions;
|
2925 | raw?: any;
|
2926 | errors: Diagnostic[];
|
2927 | wildcardDirectories?: MapLike<WatchDirectoryFlags>;
|
2928 | compileOnSave?: boolean;
|
2929 | }
|
2930 | export enum WatchDirectoryFlags {
|
2931 | None = 0,
|
2932 | Recursive = 1
|
2933 | }
|
2934 | export interface ExpandResult {
|
2935 | fileNames: string[];
|
2936 | wildcardDirectories: MapLike<WatchDirectoryFlags>;
|
2937 | }
|
2938 | export interface CreateProgramOptions {
|
2939 | rootNames: readonly string[];
|
2940 | options: CompilerOptions;
|
2941 | projectReferences?: readonly ProjectReference[];
|
2942 | host?: CompilerHost;
|
2943 | oldProgram?: Program;
|
2944 | configFileParsingDiagnostics?: readonly Diagnostic[];
|
2945 | }
|
2946 | export interface ModuleResolutionHost {
|
2947 | fileExists(fileName: string): boolean;
|
2948 | readFile(fileName: string): string | undefined;
|
2949 | trace?(s: string): void;
|
2950 | directoryExists?(directoryName: string): boolean;
|
2951 | /**
|
2952 | * Resolve a symbolic link.
|
2953 | * @see https://nodejs.org/api/fs.html#fs_fs_realpathsync_path_options
|
2954 | */
|
2955 | realpath?(path: string): string;
|
2956 | getCurrentDirectory?(): string;
|
2957 | getDirectories?(path: string): string[];
|
2958 | }
|
2959 | /**
|
2960 | * Represents the result of module resolution.
|
2961 | * Module resolution will pick up tsx/jsx/js files even if '--jsx' and '--allowJs' are turned off.
|
2962 | * The Program will then filter results based on these flags.
|
2963 | *
|
2964 | * Prefer to return a `ResolvedModuleFull` so that the file type does not have to be inferred.
|
2965 | */
|
2966 | export interface ResolvedModule {
|
2967 | /** Path of the file the module was resolved to. */
|
2968 | resolvedFileName: string;
|
2969 | /** True if `resolvedFileName` comes from `node_modules`. */
|
2970 | isExternalLibraryImport?: boolean;
|
2971 | }
|
2972 | /**
|
2973 | * ResolvedModule with an explicitly provided `extension` property.
|
2974 | * Prefer this over `ResolvedModule`.
|
2975 | * If changing this, remember to change `moduleResolutionIsEqualTo`.
|
2976 | */
|
2977 | export interface ResolvedModuleFull extends ResolvedModule {
|
2978 | /**
|
2979 | * Extension of resolvedFileName. This must match what's at the end of resolvedFileName.
|
2980 | * This is optional for backwards-compatibility, but will be added if not provided.
|
2981 | */
|
2982 | extension: Extension;
|
2983 | packageId?: PackageId;
|
2984 | }
|
2985 | /**
|
2986 | * Unique identifier with a package name and version.
|
2987 | * If changing this, remember to change `packageIdIsEqual`.
|
2988 | */
|
2989 | export interface PackageId {
|
2990 | /**
|
2991 | * Name of the package.
|
2992 | * Should not include `@types`.
|
2993 | * If accessing a non-index file, this should include its name e.g. "foo/bar".
|
2994 | */
|
2995 | name: string;
|
2996 | /**
|
2997 | * Name of a submodule within this package.
|
2998 | * May be "".
|
2999 | */
|
3000 | subModuleName: string;
|
3001 | /** Version of the package, e.g. "1.2.3" */
|
3002 | version: string;
|
3003 | }
|
3004 | export enum Extension {
|
3005 | Ts = ".ts",
|
3006 | Tsx = ".tsx",
|
3007 | Dts = ".d.ts",
|
3008 | Js = ".js",
|
3009 | Jsx = ".jsx",
|
3010 | Json = ".json",
|
3011 | TsBuildInfo = ".tsbuildinfo"
|
3012 | }
|
3013 | export interface ResolvedModuleWithFailedLookupLocations {
|
3014 | readonly resolvedModule: ResolvedModuleFull | undefined;
|
3015 | }
|
3016 | export interface ResolvedTypeReferenceDirective {
|
3017 | primary: boolean;
|
3018 | resolvedFileName: string | undefined;
|
3019 | packageId?: PackageId;
|
3020 | /** True if `resolvedFileName` comes from `node_modules`. */
|
3021 | isExternalLibraryImport?: boolean;
|
3022 | }
|
3023 | export interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations {
|
3024 | readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined;
|
3025 | readonly failedLookupLocations: string[];
|
3026 | }
|
3027 | export interface CompilerHost extends ModuleResolutionHost {
|
3028 | getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
|
3029 | getSourceFileByPath?(fileName: string, path: Path, languageVersion: ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
|
3030 | getCancellationToken?(): CancellationToken;
|
3031 | getDefaultLibFileName(options: CompilerOptions): string;
|
3032 | getDefaultLibLocation?(): string;
|
3033 | writeFile: WriteFileCallback;
|
3034 | getCurrentDirectory(): string;
|
3035 | getCanonicalFileName(fileName: string): string;
|
3036 | useCaseSensitiveFileNames(): boolean;
|
3037 | getNewLine(): string;
|
3038 | readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[];
|
3039 | resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedModule | undefined)[];
|
3040 | /**
|
3041 | * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
|
3042 | */
|
3043 | resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
|
3044 | getEnvironmentVariable?(name: string): string | undefined;
|
3045 | createHash?(data: string): string;
|
3046 | getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
|
3047 | }
|
3048 | export interface SourceMapRange extends TextRange {
|
3049 | source?: SourceMapSource;
|
3050 | }
|
3051 | export interface SourceMapSource {
|
3052 | fileName: string;
|
3053 | text: string;
|
3054 | skipTrivia?: (pos: number) => number;
|
3055 | }
|
3056 | export enum EmitFlags {
|
3057 | None = 0,
|
3058 | SingleLine = 1,
|
3059 | AdviseOnEmitNode = 2,
|
3060 | NoSubstitution = 4,
|
3061 | CapturesThis = 8,
|
3062 | NoLeadingSourceMap = 16,
|
3063 | NoTrailingSourceMap = 32,
|
3064 | NoSourceMap = 48,
|
3065 | NoNestedSourceMaps = 64,
|
3066 | NoTokenLeadingSourceMaps = 128,
|
3067 | NoTokenTrailingSourceMaps = 256,
|
3068 | NoTokenSourceMaps = 384,
|
3069 | NoLeadingComments = 512,
|
3070 | NoTrailingComments = 1024,
|
3071 | NoComments = 1536,
|
3072 | NoNestedComments = 2048,
|
3073 | HelperName = 4096,
|
3074 | ExportName = 8192,
|
3075 | LocalName = 16384,
|
3076 | InternalName = 32768,
|
3077 | Indented = 65536,
|
3078 | NoIndentation = 131072,
|
3079 | AsyncFunctionBody = 262144,
|
3080 | ReuseTempVariableScope = 524288,
|
3081 | CustomPrologue = 1048576,
|
3082 | NoHoisting = 2097152,
|
3083 | HasEndOfDeclarationMarker = 4194304,
|
3084 | Iterator = 8388608,
|
3085 | NoAsciiEscaping = 16777216,
|
3086 | }
|
3087 | export interface EmitHelper {
|
3088 | readonly name: string;
|
3089 | readonly scoped: boolean;
|
3090 | readonly text: string | ((node: EmitHelperUniqueNameCallback) => string);
|
3091 | readonly priority?: number;
|
3092 | readonly dependencies?: EmitHelper[];
|
3093 | }
|
3094 | export interface UnscopedEmitHelper extends EmitHelper {
|
3095 | readonly scoped: false;
|
3096 | readonly text: string;
|
3097 | }
|
3098 | export type EmitHelperUniqueNameCallback = (name: string) => string;
|
3099 | export enum EmitHint {
|
3100 | SourceFile = 0,
|
3101 | Expression = 1,
|
3102 | IdentifierName = 2,
|
3103 | MappedTypeParameter = 3,
|
3104 | Unspecified = 4,
|
3105 | EmbeddedStatement = 5,
|
3106 | JsxAttributeValue = 6
|
3107 | }
|
3108 | export enum OuterExpressionKinds {
|
3109 | Parentheses = 1,
|
3110 | TypeAssertions = 2,
|
3111 | NonNullAssertions = 4,
|
3112 | PartiallyEmittedExpressions = 8,
|
3113 | Assertions = 6,
|
3114 | All = 15
|
3115 | }
|
3116 | export type TypeOfTag = "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function";
|
3117 | export interface NodeFactory {
|
3118 | createNodeArray<T extends Node>(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray<T>;
|
3119 | createNumericLiteral(value: string | number, numericLiteralFlags?: TokenFlags): NumericLiteral;
|
3120 | createBigIntLiteral(value: string | PseudoBigInt): BigIntLiteral;
|
3121 | createStringLiteral(text: string, isSingleQuote?: boolean): StringLiteral;
|
3122 | createStringLiteralFromNode(sourceNode: PropertyNameLiteral, isSingleQuote?: boolean): StringLiteral;
|
3123 | createRegularExpressionLiteral(text: string): RegularExpressionLiteral;
|
3124 | createIdentifier(text: string): Identifier;
|
3125 |
|
3126 | createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined): Identifier;
|
3127 | /** Create a unique temporary variable for use in a loop. */
|
3128 | createLoopVariable(): Identifier;
|
3129 | /** Create a unique name based on the supplied text. */
|
3130 | createUniqueName(text: string, flags?: GeneratedIdentifierFlags): Identifier;
|
3131 | /** Create a unique name generated for a node. */
|
3132 | getGeneratedNameForNode(node: Node | undefined): Identifier;
|
3133 | createPrivateIdentifier(text: string): PrivateIdentifier;
|
3134 | createToken(token: SyntaxKind.SuperKeyword): SuperExpression;
|
3135 | createToken(token: SyntaxKind.ThisKeyword): ThisExpression;
|
3136 | createToken(token: SyntaxKind.NullKeyword): NullLiteral;
|
3137 | createToken(token: SyntaxKind.TrueKeyword): TrueLiteral;
|
3138 | createToken(token: SyntaxKind.FalseKeyword): FalseLiteral;
|
3139 | createToken<TKind extends PunctuationSyntaxKind>(token: TKind): PunctuationToken<TKind>;
|
3140 | createToken<TKind extends KeywordTypeSyntaxKind>(token: TKind): KeywordTypeNode<TKind>;
|
3141 | createToken<TKind extends ModifierSyntaxKind>(token: TKind): ModifierToken<TKind>;
|
3142 | createToken<TKind extends KeywordSyntaxKind>(token: TKind): KeywordToken<TKind>;
|
3143 | createToken<TKind extends SyntaxKind.Unknown | SyntaxKind.EndOfFileToken>(token: TKind): Token<TKind>;
|
3144 | createSuper(): SuperExpression;
|
3145 | createThis(): ThisExpression;
|
3146 | createNull(): NullLiteral;
|
3147 | createTrue(): TrueLiteral;
|
3148 | createFalse(): FalseLiteral;
|
3149 | createModifier<T extends ModifierSyntaxKind>(kind: T): ModifierToken<T>;
|
3150 | createModifiersFromModifierFlags(flags: ModifierFlags): Modifier[];
|
3151 | createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName;
|
3152 | updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName;
|
3153 | createComputedPropertyName(expression: Expression): ComputedPropertyName;
|
3154 | updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName;
|
3155 | createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration;
|
3156 | updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
|
3157 | createParameterDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration;
|
3158 | updateParameterDeclaration(node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration;
|
3159 | createDecorator(expression: Expression): Decorator;
|
3160 | updateDecorator(node: Decorator, expression: Expression): Decorator;
|
3161 | createPropertySignature(modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature;
|
3162 | updatePropertySignature(node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature;
|
3163 | createPropertyDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
|
3164 | updatePropertyDeclaration(node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
|
3165 | createMethodSignature(modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): MethodSignature;
|
3166 | updateMethodSignature(node: MethodSignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): MethodSignature;
|
3167 | createMethodDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
|
3168 | updateMethodDeclaration(node: MethodDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
|
3169 | createConstructorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
|
3170 | updateConstructorDeclaration(node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
|
3171 | createGetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
|
3172 | updateGetAccessorDeclaration(node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
|
3173 | createSetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
|
3174 | updateSetAccessorDeclaration(node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
|
3175 | createCallSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration;
|
3176 | updateCallSignature(node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): CallSignatureDeclaration;
|
3177 | createConstructSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration;
|
3178 | updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration;
|
3179 | createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
|
3180 | updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
|
3181 | createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(kind: TKind): KeywordTypeNode<TKind>;
|
3182 | createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode;
|
3183 | updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode;
|
3184 | createTypeReferenceNode(typeName: string | EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode;
|
3185 | updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode;
|
3186 | createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): FunctionTypeNode;
|
3187 | updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): FunctionTypeNode;
|
3188 | createConstructorTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode;
|
3189 | updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode;
|
3190 | createTypeQueryNode(exprName: EntityName): TypeQueryNode;
|
3191 | updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName): TypeQueryNode;
|
3192 | createTypeLiteralNode(members: readonly TypeElement[] | undefined): TypeLiteralNode;
|
3193 | updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray<TypeElement>): TypeLiteralNode;
|
3194 | createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
|
3195 | updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode;
|
3196 | createTupleTypeNode(elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode;
|
3197 | updateTupleTypeNode(node: TupleTypeNode, elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode;
|
3198 | createNamedTupleMember(dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember;
|
3199 | updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember;
|
3200 | createOptionalTypeNode(type: TypeNode): OptionalTypeNode;
|
3201 | updateOptionalTypeNode(node: OptionalTypeNode, type: TypeNode): OptionalTypeNode;
|
3202 | createRestTypeNode(type: TypeNode): RestTypeNode;
|
3203 | updateRestTypeNode(node: RestTypeNode, type: TypeNode): RestTypeNode;
|
3204 | createUnionTypeNode(types: readonly TypeNode[]): UnionTypeNode;
|
3205 | updateUnionTypeNode(node: UnionTypeNode, types: NodeArray<TypeNode>): UnionTypeNode;
|
3206 | createIntersectionTypeNode(types: readonly TypeNode[]): IntersectionTypeNode;
|
3207 | updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray<TypeNode>): IntersectionTypeNode;
|
3208 | createConditionalTypeNode(checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
|
3209 | updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
|
3210 | createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode;
|
3211 | updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode;
|
3212 | createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode;
|
3213 | updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode;
|
3214 | createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
|
3215 | updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
|
3216 | createThisTypeNode(): ThisTypeNode;
|
3217 | createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode;
|
3218 | updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode;
|
3219 | createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
|
3220 | updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
|
3221 | createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode;
|
3222 | updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode;
|
3223 | createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode;
|
3224 | updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode;
|
3225 | createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern;
|
3226 | updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern;
|
3227 | createArrayBindingPattern(elements: readonly ArrayBindingElement[]): ArrayBindingPattern;
|
3228 | updateArrayBindingPattern(node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]): ArrayBindingPattern;
|
3229 | createBindingElement(dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression): BindingElement;
|
3230 | updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined): BindingElement;
|
3231 | createArrayLiteralExpression(elements?: readonly Expression[], multiLine?: boolean): ArrayLiteralExpression;
|
3232 | updateArrayLiteralExpression(node: ArrayLiteralExpression, elements: readonly Expression[]): ArrayLiteralExpression;
|
3233 | createObjectLiteralExpression(properties?: readonly ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression;
|
3234 | updateObjectLiteralExpression(node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]): ObjectLiteralExpression;
|
3235 | createPropertyAccessExpression(expression: Expression, name: string | Identifier | PrivateIdentifier): PropertyAccessExpression;
|
3236 | updatePropertyAccessExpression(node: PropertyAccessExpression, expression: Expression, name: Identifier | PrivateIdentifier): PropertyAccessExpression;
|
3237 | createPropertyAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | Identifier | PrivateIdentifier): PropertyAccessChain;
|
3238 | updatePropertyAccessChain(node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: Identifier | PrivateIdentifier): PropertyAccessChain;
|
3239 | createElementAccessExpression(expression: Expression, index: number | Expression): ElementAccessExpression;
|
3240 | updateElementAccessExpression(node: ElementAccessExpression, expression: Expression, argumentExpression: Expression): ElementAccessExpression;
|
3241 | createElementAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression): ElementAccessChain;
|
3242 | updateElementAccessChain(node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression): ElementAccessChain;
|
3243 | createCallExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallExpression;
|
3244 | updateCallExpression(node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallExpression;
|
3245 | createCallChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallChain;
|
3246 | updateCallChain(node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallChain;
|
3247 | createNewExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression;
|
3248 | updateNewExpression(node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression;
|
3249 | createTaggedTemplateExpression(tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
|
3250 | updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
|
3251 | createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion;
|
3252 | updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion;
|
3253 | createParenthesizedExpression(expression: Expression): ParenthesizedExpression;
|
3254 | updateParenthesizedExpression(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression;
|
3255 | createFunctionExpression(modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[] | undefined, type: TypeNode | undefined, body: Block): FunctionExpression;
|
3256 | updateFunctionExpression(node: FunctionExpression, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block): FunctionExpression;
|
3257 | createArrowFunction(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction;
|
3258 | updateArrowFunction(node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction;
|
3259 | createDeleteExpression(expression: Expression): DeleteExpression;
|
3260 | updateDeleteExpression(node: DeleteExpression, expression: Expression): DeleteExpression;
|
3261 | createTypeOfExpression(expression: Expression): TypeOfExpression;
|
3262 | updateTypeOfExpression(node: TypeOfExpression, expression: Expression): TypeOfExpression;
|
3263 | createVoidExpression(expression: Expression): VoidExpression;
|
3264 | updateVoidExpression(node: VoidExpression, expression: Expression): VoidExpression;
|
3265 | createAwaitExpression(expression: Expression): AwaitExpression;
|
3266 | updateAwaitExpression(node: AwaitExpression, expression: Expression): AwaitExpression;
|
3267 | createPrefixUnaryExpression(operator: PrefixUnaryOperator, operand: Expression): PrefixUnaryExpression;
|
3268 | updatePrefixUnaryExpression(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression;
|
3269 | createPostfixUnaryExpression(operand: Expression, operator: PostfixUnaryOperator): PostfixUnaryExpression;
|
3270 | updatePostfixUnaryExpression(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression;
|
3271 | createBinaryExpression(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression;
|
3272 | updateBinaryExpression(node: BinaryExpression, left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression;
|
3273 | createConditionalExpression(condition: Expression, questionToken: QuestionToken | undefined, whenTrue: Expression, colonToken: ColonToken | undefined, whenFalse: Expression): ConditionalExpression;
|
3274 | updateConditionalExpression(node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression;
|
3275 | createTemplateExpression(head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression;
|
3276 | updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression;
|
3277 | createTemplateHead(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateHead;
|
3278 | createTemplateHead(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateHead;
|
3279 | createTemplateMiddle(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateMiddle;
|
3280 | createTemplateMiddle(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateMiddle;
|
3281 | createTemplateTail(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateTail;
|
3282 | createTemplateTail(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateTail;
|
3283 | createNoSubstitutionTemplateLiteral(text: string, rawText?: string): NoSubstitutionTemplateLiteral;
|
3284 | createNoSubstitutionTemplateLiteral(text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral;
|
3285 | createYieldExpression(asteriskToken: AsteriskToken, expression: Expression): YieldExpression;
|
3286 | createYieldExpression(asteriskToken: undefined, expression: Expression | undefined): YieldExpression;
|
3287 | updateYieldExpression(node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined): YieldExpression;
|
3288 | createSpreadElement(expression: Expression): SpreadElement;
|
3289 | updateSpreadElement(node: SpreadElement, expression: Expression): SpreadElement;
|
3290 | createClassExpression(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression;
|
3291 | updateClassExpression(node: ClassExpression, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression;
|
3292 | createOmittedExpression(): OmittedExpression;
|
3293 | createExpressionWithTypeArguments(expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments;
|
3294 | updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments;
|
3295 | createAsExpression(expression: Expression, type: TypeNode): AsExpression;
|
3296 | updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression;
|
3297 | createNonNullExpression(expression: Expression): NonNullExpression;
|
3298 | updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression;
|
3299 | createNonNullChain(expression: Expression): NonNullChain;
|
3300 | updateNonNullChain(node: NonNullChain, expression: Expression): NonNullChain;
|
3301 | createMetaProperty(keywordToken: MetaProperty["keywordToken"], name: Identifier): MetaProperty;
|
3302 | updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty;
|
3303 | createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
|
3304 | updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
|
3305 | createSemicolonClassElement(): SemicolonClassElement;
|
3306 | createBlock(statements: readonly Statement[], multiLine?: boolean): Block;
|
3307 | updateBlock(node: Block, statements: readonly Statement[]): Block;
|
3308 | createVariableStatement(modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]): VariableStatement;
|
3309 | updateVariableStatement(node: VariableStatement, modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList): VariableStatement;
|
3310 | createEmptyStatement(): EmptyStatement;
|
3311 | createExpressionStatement(expression: Expression): ExpressionStatement;
|
3312 | updateExpressionStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement;
|
3313 | createIfStatement(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement;
|
3314 | updateIfStatement(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined): IfStatement;
|
3315 | createDoStatement(statement: Statement, expression: Expression): DoStatement;
|
3316 | updateDoStatement(node: DoStatement, statement: Statement, expression: Expression): DoStatement;
|
3317 | createWhileStatement(expression: Expression, statement: Statement): WhileStatement;
|
3318 | updateWhileStatement(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement;
|
3319 | createForStatement(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
|
3320 | updateForStatement(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
|
3321 | createForInStatement(initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
|
3322 | updateForInStatement(node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
|
3323 | createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
|
3324 | updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
|
3325 | createContinueStatement(label?: string | Identifier): ContinueStatement;
|
3326 | updateContinueStatement(node: ContinueStatement, label: Identifier | undefined): ContinueStatement;
|
3327 | createBreakStatement(label?: string | Identifier): BreakStatement;
|
3328 | updateBreakStatement(node: BreakStatement, label: Identifier | undefined): BreakStatement;
|
3329 | createReturnStatement(expression?: Expression): ReturnStatement;
|
3330 | updateReturnStatement(node: ReturnStatement, expression: Expression | undefined): ReturnStatement;
|
3331 | createWithStatement(expression: Expression, statement: Statement): WithStatement;
|
3332 | updateWithStatement(node: WithStatement, expression: Expression, statement: Statement): WithStatement;
|
3333 | createSwitchStatement(expression: Expression, caseBlock: CaseBlock): SwitchStatement;
|
3334 | updateSwitchStatement(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement;
|
3335 | createLabeledStatement(label: string | Identifier, statement: Statement): LabeledStatement;
|
3336 | updateLabeledStatement(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement;
|
3337 | createThrowStatement(expression: Expression): ThrowStatement;
|
3338 | updateThrowStatement(node: ThrowStatement, expression: Expression): ThrowStatement;
|
3339 | createTryStatement(tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
|
3340 | updateTryStatement(node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
|
3341 | createDebuggerStatement(): DebuggerStatement;
|
3342 | createVariableDeclaration(name: string | BindingName, exclamationToken?: ExclamationToken, type?: TypeNode, initializer?: Expression): VariableDeclaration;
|
3343 | updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
|
3344 | createVariableDeclarationList(declarations: readonly VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList;
|
3345 | updateVariableDeclarationList(node: VariableDeclarationList, declarations: readonly VariableDeclaration[]): VariableDeclarationList;
|
3346 | createFunctionDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
|
3347 | updateFunctionDeclaration(node: FunctionDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
|
3348 | createClassDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
|
3349 | updateClassDeclaration(node: ClassDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
|
3350 | createInterfaceDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
|
3351 | updateInterfaceDeclaration(node: InterfaceDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
|
3352 | createTypeAliasDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
|
3353 | updateTypeAliasDeclaration(node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
|
3354 | createEnumDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration;
|
3355 | updateEnumDeclaration(node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration;
|
3356 | createModuleDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration;
|
3357 | updateModuleDeclaration(node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration;
|
3358 | createModuleBlock(statements: readonly Statement[]): ModuleBlock;
|
3359 | updateModuleBlock(node: ModuleBlock, statements: readonly Statement[]): ModuleBlock;
|
3360 | createCaseBlock(clauses: readonly CaseOrDefaultClause[]): CaseBlock;
|
3361 | updateCaseBlock(node: CaseBlock, clauses: readonly CaseOrDefaultClause[]): CaseBlock;
|
3362 | createNamespaceExportDeclaration(name: string | Identifier): NamespaceExportDeclaration;
|
3363 | updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration;
|
3364 | createImportEqualsDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
|
3365 | updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
|
3366 | createImportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression): ImportDeclaration;
|
3367 | updateImportDeclaration(node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression): ImportDeclaration;
|
3368 | createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
|
3369 | updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
|
3370 | createNamespaceImport(name: Identifier): NamespaceImport;
|
3371 | updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
|
3372 | createNamespaceExport(name: Identifier): NamespaceExport;
|
3373 | updateNamespaceExport(node: NamespaceExport, name: Identifier): NamespaceExport;
|
3374 | createNamedImports(elements: readonly ImportSpecifier[]): NamedImports;
|
3375 | updateNamedImports(node: NamedImports, elements: readonly ImportSpecifier[]): NamedImports;
|
3376 | createImportSpecifier(propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
|
3377 | updateImportSpecifier(node: ImportSpecifier, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
|
3378 | createExportAssignment(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment;
|
3379 | updateExportAssignment(node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment;
|
3380 | createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression): ExportDeclaration;
|
3381 | updateExportDeclaration(node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined): ExportDeclaration;
|
3382 | createNamedExports(elements: readonly ExportSpecifier[]): NamedExports;
|
3383 | updateNamedExports(node: NamedExports, elements: readonly ExportSpecifier[]): NamedExports;
|
3384 | createExportSpecifier(propertyName: string | Identifier | undefined, name: string | Identifier): ExportSpecifier;
|
3385 | updateExportSpecifier(node: ExportSpecifier, propertyName: Identifier | undefined, name: Identifier): ExportSpecifier;
|
3386 | createExternalModuleReference(expression: Expression): ExternalModuleReference;
|
3387 | updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference;
|
3388 | createJSDocAllType(): JSDocAllType;
|
3389 | createJSDocUnknownType(): JSDocUnknownType;
|
3390 | createJSDocNonNullableType(type: TypeNode): JSDocNonNullableType;
|
3391 | updateJSDocNonNullableType(node: JSDocNonNullableType, type: TypeNode): JSDocNonNullableType;
|
3392 | createJSDocNullableType(type: TypeNode): JSDocNullableType;
|
3393 | updateJSDocNullableType(node: JSDocNullableType, type: TypeNode): JSDocNullableType;
|
3394 | createJSDocOptionalType(type: TypeNode): JSDocOptionalType;
|
3395 | updateJSDocOptionalType(node: JSDocOptionalType, type: TypeNode): JSDocOptionalType;
|
3396 | createJSDocFunctionType(parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType;
|
3397 | updateJSDocFunctionType(node: JSDocFunctionType, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType;
|
3398 | createJSDocVariadicType(type: TypeNode): JSDocVariadicType;
|
3399 | updateJSDocVariadicType(node: JSDocVariadicType, type: TypeNode): JSDocVariadicType;
|
3400 | createJSDocNamepathType(type: TypeNode): JSDocNamepathType;
|
3401 | updateJSDocNamepathType(node: JSDocNamepathType, type: TypeNode): JSDocNamepathType;
|
3402 | createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression;
|
3403 | updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression;
|
3404 | createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral;
|
3405 | updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral;
|
3406 | createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature;
|
3407 | updateJSDocSignature(node: JSDocSignature, typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type: JSDocReturnTag | undefined): JSDocSignature;
|
3408 | createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string): JSDocTemplateTag;
|
3409 | updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | undefined): JSDocTemplateTag;
|
3410 | createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string): JSDocTypedefTag;
|
3411 | updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | JSDocTypeLiteral | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | undefined): JSDocTypedefTag;
|
3412 | createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string): JSDocParameterTag;
|
3413 | updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | undefined): JSDocParameterTag;
|
3414 | createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string): JSDocPropertyTag;
|
3415 | updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | undefined): JSDocPropertyTag;
|
3416 | createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocTypeTag;
|
3417 | updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocTypeTag;
|
3418 | createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocReturnTag;
|
3419 | updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocReturnTag;
|
3420 | createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocThisTag;
|
3421 | updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocThisTag;
|
3422 | createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocEnumTag;
|
3423 | updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocEnumTag;
|
3424 | createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string): JSDocCallbackTag;
|
3425 | updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | undefined): JSDocCallbackTag;
|
3426 | createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string): JSDocAugmentsTag;
|
3427 | updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | undefined): JSDocAugmentsTag;
|
3428 | createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string): JSDocImplementsTag;
|
3429 | updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment: string | undefined): JSDocImplementsTag;
|
3430 | createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string): JSDocAuthorTag;
|
3431 | updateJSDocAuthorTag(node: JSDocAuthorTag, tagName: Identifier | undefined, comment: string | undefined): JSDocAuthorTag;
|
3432 | createJSDocClassTag(tagName: Identifier | undefined, comment?: string): JSDocClassTag;
|
3433 | updateJSDocClassTag(node: JSDocClassTag, tagName: Identifier | undefined, comment: string | undefined): JSDocClassTag;
|
3434 | createJSDocPublicTag(tagName: Identifier | undefined, comment?: string): JSDocPublicTag;
|
3435 | updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier | undefined, comment: string | undefined): JSDocPublicTag;
|
3436 | createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string): JSDocPrivateTag;
|
3437 | updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier | undefined, comment: string | undefined): JSDocPrivateTag;
|
3438 | createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string): JSDocProtectedTag;
|
3439 | updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier | undefined, comment: string | undefined): JSDocProtectedTag;
|
3440 | createJSDocReadonlyTag(tagName: Identifier | undefined, comment?: string): JSDocReadonlyTag;
|
3441 | updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | undefined): JSDocReadonlyTag;
|
3442 | createJSDocUnknownTag(tagName: Identifier, comment?: string): JSDocUnknownTag;
|
3443 | updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | undefined): JSDocUnknownTag;
|
3444 | createJSDocDeprecatedTag(tagName: Identifier, comment?: string): JSDocDeprecatedTag;
|
3445 | updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string): JSDocDeprecatedTag;
|
3446 | createJSDocComment(comment?: string | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
|
3447 | updateJSDocComment(node: JSDoc, comment: string | undefined, tags: readonly JSDocTag[] | undefined): JSDoc;
|
3448 | createJsxElement(openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
|
3449 | updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
|
3450 | createJsxSelfClosingElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement;
|
3451 | updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement;
|
3452 | createJsxOpeningElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement;
|
3453 | updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement;
|
3454 | createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement;
|
3455 | updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement;
|
3456 | createJsxFragment(openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
|
3457 | createJsxText(text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText;
|
3458 | updateJsxText(node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText;
|
3459 | createJsxOpeningFragment(): JsxOpeningFragment;
|
3460 | createJsxJsxClosingFragment(): JsxClosingFragment;
|
3461 | updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
|
3462 | createJsxAttribute(name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
|
3463 | updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
|
3464 | createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
|
3465 | updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
|
3466 | createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
|
3467 | updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute;
|
3468 | createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression;
|
3469 | updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression;
|
3470 | createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause;
|
3471 | updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause;
|
3472 | createDefaultClause(statements: readonly Statement[]): DefaultClause;
|
3473 | updateDefaultClause(node: DefaultClause, statements: readonly Statement[]): DefaultClause;
|
3474 | createHeritageClause(token: HeritageClause["token"], types: readonly ExpressionWithTypeArguments[]): HeritageClause;
|
3475 | updateHeritageClause(node: HeritageClause, types: readonly ExpressionWithTypeArguments[]): HeritageClause;
|
3476 | createCatchClause(variableDeclaration: string | VariableDeclaration | undefined, block: Block): CatchClause;
|
3477 | updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause;
|
3478 | createPropertyAssignment(name: string | PropertyName, initializer: Expression): PropertyAssignment;
|
3479 | updatePropertyAssignment(node: PropertyAssignment, name: PropertyName, initializer: Expression): PropertyAssignment;
|
3480 | createShorthandPropertyAssignment(name: string | Identifier, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment;
|
3481 | updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined): ShorthandPropertyAssignment;
|
3482 | createSpreadAssignment(expression: Expression): SpreadAssignment;
|
3483 | updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment;
|
3484 | createEnumMember(name: string | PropertyName, initializer?: Expression): EnumMember;
|
3485 | updateEnumMember(node: EnumMember, name: PropertyName, initializer: Expression | undefined): EnumMember;
|
3486 | createSourceFile(statements: readonly Statement[], endOfFileToken: EndOfFileToken, flags: NodeFlags): SourceFile;
|
3487 | updateSourceFile(node: SourceFile, statements: readonly Statement[], isDeclarationFile?: boolean, referencedFiles?: readonly FileReference[], typeReferences?: readonly FileReference[], hasNoDefaultLib?: boolean, libReferences?: readonly FileReference[]): SourceFile;
|
3488 | createNotEmittedStatement(original: Node): NotEmittedStatement;
|
3489 | createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression;
|
3490 | updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
|
3491 | createCommaListExpression(elements: readonly Expression[]): CommaListExpression;
|
3492 | updateCommaListExpression(node: CommaListExpression, elements: readonly Expression[]): CommaListExpression;
|
3493 | createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
|
3494 | updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
|
3495 | createComma(left: Expression, right: Expression): BinaryExpression;
|
3496 | createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
|
3497 | createAssignment(left: Expression, right: Expression): AssignmentExpression<EqualsToken>;
|
3498 | createLogicalOr(left: Expression, right: Expression): BinaryExpression;
|
3499 | createLogicalAnd(left: Expression, right: Expression): BinaryExpression;
|
3500 | createBitwiseOr(left: Expression, right: Expression): BinaryExpression;
|
3501 | createBitwiseXor(left: Expression, right: Expression): BinaryExpression;
|
3502 | createBitwiseAnd(left: Expression, right: Expression): BinaryExpression;
|
3503 | createStrictEquality(left: Expression, right: Expression): BinaryExpression;
|
3504 | createStrictInequality(left: Expression, right: Expression): BinaryExpression;
|
3505 | createEquality(left: Expression, right: Expression): BinaryExpression;
|
3506 | createInequality(left: Expression, right: Expression): BinaryExpression;
|
3507 | createLessThan(left: Expression, right: Expression): BinaryExpression;
|
3508 | createLessThanEquals(left: Expression, right: Expression): BinaryExpression;
|
3509 | createGreaterThan(left: Expression, right: Expression): BinaryExpression;
|
3510 | createGreaterThanEquals(left: Expression, right: Expression): BinaryExpression;
|
3511 | createLeftShift(left: Expression, right: Expression): BinaryExpression;
|
3512 | createRightShift(left: Expression, right: Expression): BinaryExpression;
|
3513 | createUnsignedRightShift(left: Expression, right: Expression): BinaryExpression;
|
3514 | createAdd(left: Expression, right: Expression): BinaryExpression;
|
3515 | createSubtract(left: Expression, right: Expression): BinaryExpression;
|
3516 | createMultiply(left: Expression, right: Expression): BinaryExpression;
|
3517 | createDivide(left: Expression, right: Expression): BinaryExpression;
|
3518 | createModulo(left: Expression, right: Expression): BinaryExpression;
|
3519 | createExponent(left: Expression, right: Expression): BinaryExpression;
|
3520 | createPrefixPlus(operand: Expression): PrefixUnaryExpression;
|
3521 | createPrefixMinus(operand: Expression): PrefixUnaryExpression;
|
3522 | createPrefixIncrement(operand: Expression): PrefixUnaryExpression;
|
3523 | createPrefixDecrement(operand: Expression): PrefixUnaryExpression;
|
3524 | createBitwiseNot(operand: Expression): PrefixUnaryExpression;
|
3525 | createLogicalNot(operand: Expression): PrefixUnaryExpression;
|
3526 | createPostfixIncrement(operand: Expression): PostfixUnaryExpression;
|
3527 | createPostfixDecrement(operand: Expression): PostfixUnaryExpression;
|
3528 | createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression;
|
3529 | createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
|
3530 | createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression;
|
3531 | createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
|
3532 | createVoidZero(): VoidExpression;
|
3533 | createExportDefault(expression: Expression): ExportAssignment;
|
3534 | createExternalModuleExport(exportName: Identifier): ExportDeclaration;
|
3535 | restoreOuterExpressions(outerExpression: Expression | undefined, innerExpression: Expression, kinds?: OuterExpressionKinds): Expression;
|
3536 | }
|
3537 | export interface CoreTransformationContext {
|
3538 | readonly factory: NodeFactory;
|
3539 | /** Gets the compiler options supplied to the transformer. */
|
3540 | getCompilerOptions(): CompilerOptions;
|
3541 | /** Starts a new lexical environment. */
|
3542 | startLexicalEnvironment(): void;
|
3543 | /** Suspends the current lexical environment, usually after visiting a parameter list. */
|
3544 | suspendLexicalEnvironment(): void;
|
3545 | /** Resumes a suspended lexical environment, usually before visiting a function body. */
|
3546 | resumeLexicalEnvironment(): void;
|
3547 | /** Ends a lexical environment, returning any declarations. */
|
3548 | endLexicalEnvironment(): Statement[] | undefined;
|
3549 | /** Hoists a function declaration to the containing scope. */
|
3550 | hoistFunctionDeclaration(node: FunctionDeclaration): void;
|
3551 | /** Hoists a variable declaration to the containing scope. */
|
3552 | hoistVariableDeclaration(node: Identifier): void;
|
3553 | }
|
3554 | export interface TransformationContext extends CoreTransformationContext {
|
3555 | /** Records a request for a non-scoped emit helper in the current context. */
|
3556 | requestEmitHelper(helper: EmitHelper): void;
|
3557 | /** Gets and resets the requested non-scoped emit helpers. */
|
3558 | readEmitHelpers(): EmitHelper[] | undefined;
|
3559 | /** Enables expression substitutions in the pretty printer for the provided SyntaxKind. */
|
3560 | enableSubstitution(kind: SyntaxKind): void;
|
3561 | /** Determines whether expression substitutions are enabled for the provided node. */
|
3562 | isSubstitutionEnabled(node: Node): boolean;
|
3563 | /**
|
3564 | * Hook used by transformers to substitute expressions just before they
|
3565 | * are emitted by the pretty printer.
|
3566 | *
|
3567 | * NOTE: Transformation hooks should only be modified during `Transformer` initialization,
|
3568 | * before returning the `NodeTransformer` callback.
|
3569 | */
|
3570 | onSubstituteNode: (hint: EmitHint, node: Node) => Node;
|
3571 | |
3572 |
|
3573 |
|
3574 |
|
3575 | enableEmitNotification(kind: SyntaxKind): void;
|
3576 | |
3577 |
|
3578 |
|
3579 |
|
3580 | isEmitNotificationEnabled(node: Node): boolean;
|
3581 | |
3582 |
|
3583 |
|
3584 |
|
3585 |
|
3586 |
|
3587 |
|
3588 | onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void;
|
3589 | }
|
3590 | export interface TransformationResult<T extends Node> {
|
3591 |
|
3592 | transformed: T[];
|
3593 |
|
3594 | diagnostics?: DiagnosticWithLocation[];
|
3595 | |
3596 |
|
3597 |
|
3598 |
|
3599 |
|
3600 |
|
3601 | substituteNode(hint: EmitHint, node: Node): Node;
|
3602 | |
3603 |
|
3604 |
|
3605 |
|
3606 |
|
3607 |
|
3608 |
|
3609 | emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;
|
3610 | |
3611 |
|
3612 |
|
3613 |
|
3614 |
|
3615 | isEmitNotificationEnabled?(node: Node): boolean;
|
3616 | |
3617 |
|
3618 |
|
3619 | dispose(): void;
|
3620 | }
|
3621 | |
3622 |
|
3623 |
|
3624 |
|
3625 | export type TransformerFactory<T extends Node> = (context: TransformationContext) => Transformer<T>;
|
3626 | |
3627 |
|
3628 |
|
3629 | export type Transformer<T extends Node> = (node: T) => T;
|
3630 | |
3631 |
|
3632 |
|
3633 | export type Visitor = (node: Node) => VisitResult<Node>;
|
3634 | export interface NodeVisitor {
|
3635 | <T extends Node>(nodes: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T;
|
3636 | <T extends Node>(nodes: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T | undefined;
|
3637 | }
|
3638 | export interface NodesVisitor {
|
3639 | <T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
|
3640 | <T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined;
|
3641 | }
|
3642 | export type VisitResult<T extends Node> = T | T[] | undefined;
|
3643 | export interface Printer {
|
3644 | /**
|
3645 | * Print a node and its subtree as-is, without any emit transformations.
|
3646 | * @param hint A value indicating the purpose of a node. This is primarily used to
|
3647 | * distinguish between an `Identifier` used in an expression position, versus an
|
3648 | * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you
|
3649 | * should just pass `Unspecified`.
|
3650 | * @param node The node to print. The node and its subtree are printed as-is, without any
|
3651 | * emit transformations.
|
3652 | * @param sourceFile A source file that provides context for the node. The source text of
|
3653 | * the file is used to emit the original source content for literals and identifiers, while
|
3654 | * the identifiers of the source file are used when generating unique names to avoid
|
3655 | * collisions.
|
3656 | */
|
3657 | printNode(hint: EmitHint, node: Node, sourceFile: SourceFile): string;
|
3658 | /**
|
3659 | * Prints a list of nodes using the given format flags
|
3660 | */
|
3661 | printList<T extends Node>(format: ListFormat, list: NodeArray<T>, sourceFile: SourceFile): string;
|
3662 | /**
|
3663 | * Prints a source file as-is, without any emit transformations.
|
3664 | */
|
3665 | printFile(sourceFile: SourceFile): string;
|
3666 | /**
|
3667 | * Prints a bundle of source files as-is, without any emit transformations.
|
3668 | */
|
3669 | printBundle(bundle: Bundle): string;
|
3670 | }
|
3671 | export interface PrintHandlers {
|
3672 | /**
|
3673 | * A hook used by the Printer when generating unique names to avoid collisions with
|
3674 | * globally defined names that exist outside of the current source file.
|
3675 | */
|
3676 | hasGlobalName?(name: string): boolean;
|
3677 | /**
|
3678 | * A hook used by the Printer to provide notifications prior to emitting a node. A
|
3679 | * compatible implementation **must** invoke `emitCallback` with the provided `hint` and
|
3680 | * `node` values.
|
3681 | * @param hint A hint indicating the intended purpose of the node.
|
3682 | * @param node The node to emit.
|
3683 | * @param emitCallback A callback that, when invoked, will emit the node.
|
3684 | * @example
|
3685 | * ```ts
|
3686 | * var printer = createPrinter(printerOptions, {
|
3687 | * onEmitNode(hint, node, emitCallback) {
|
3688 | *
|
3689 | * emitCallback(hint, node);
|
3690 | *
|
3691 | * }
|
3692 | * });
|
3693 | * ```
|
3694 | */
|
3695 | onEmitNode?(hint: EmitHint, node: Node | undefined, emitCallback: (hint: EmitHint, node: Node | undefined) => void): void;
|
3696 | /**
|
3697 | * A hook used to check if an emit notification is required for a node.
|
3698 | * @param node The node to emit.
|
3699 | */
|
3700 | isEmitNotificationEnabled?(node: Node | undefined): boolean;
|
3701 | /**
|
3702 | * A hook used by the Printer to perform just-in-time substitution of a node. This is
|
3703 | * primarily used by node transformations that need to substitute one node for another,
|
3704 | * such as replacing `myExportedVar` with `exports.myExportedVar`.
|
3705 | * @param hint A hint indicating the intended purpose of the node.
|
3706 | * @param node The node to emit.
|
3707 | * @example
|
3708 | * ```ts
|
3709 | * var printer = createPrinter(printerOptions, {
|
3710 | * substituteNode(hint, node) {
|
3711 | *
|
3712 | * return node;
|
3713 | * }
|
3714 | * });
|
3715 | * ```
|
3716 | */
|
3717 | substituteNode?(hint: EmitHint, node: Node): Node;
|
3718 | }
|
3719 | export interface PrinterOptions {
|
3720 | removeComments?: boolean;
|
3721 | newLine?: NewLineKind;
|
3722 | omitTrailingSemicolon?: boolean;
|
3723 | noEmitHelpers?: boolean;
|
3724 | }
|
3725 | export interface GetEffectiveTypeRootsHost {
|
3726 | directoryExists?(directoryName: string): boolean;
|
3727 | getCurrentDirectory?(): string;
|
3728 | }
|
3729 | export interface TextSpan {
|
3730 | start: number;
|
3731 | length: number;
|
3732 | }
|
3733 | export interface TextChangeRange {
|
3734 | span: TextSpan;
|
3735 | newLength: number;
|
3736 | }
|
3737 | export interface SyntaxList extends Node {
|
3738 | kind: SyntaxKind.SyntaxList;
|
3739 | _children: Node[];
|
3740 | }
|
3741 | export enum ListFormat {
|
3742 | None = 0,
|
3743 | SingleLine = 0,
|
3744 | MultiLine = 1,
|
3745 | PreserveLines = 2,
|
3746 | LinesMask = 3,
|
3747 | NotDelimited = 0,
|
3748 | BarDelimited = 4,
|
3749 | AmpersandDelimited = 8,
|
3750 | CommaDelimited = 16,
|
3751 | AsteriskDelimited = 32,
|
3752 | DelimitersMask = 60,
|
3753 | AllowTrailingComma = 64,
|
3754 | Indented = 128,
|
3755 | SpaceBetweenBraces = 256,
|
3756 | SpaceBetweenSiblings = 512,
|
3757 | Braces = 1024,
|
3758 | Parenthesis = 2048,
|
3759 | AngleBrackets = 4096,
|
3760 | SquareBrackets = 8192,
|
3761 | BracketsMask = 15360,
|
3762 | OptionalIfUndefined = 16384,
|
3763 | OptionalIfEmpty = 32768,
|
3764 | Optional = 49152,
|
3765 | PreferNewLine = 65536,
|
3766 | NoTrailingNewLine = 131072,
|
3767 | NoInterveningComments = 262144,
|
3768 | NoSpaceIfEmpty = 524288,
|
3769 | SingleElement = 1048576,
|
3770 | SpaceAfterList = 2097152,
|
3771 | Modifiers = 262656,
|
3772 | HeritageClauses = 512,
|
3773 | SingleLineTypeLiteralMembers = 768,
|
3774 | MultiLineTypeLiteralMembers = 32897,
|
3775 | SingleLineTupleTypeElements = 528,
|
3776 | MultiLineTupleTypeElements = 657,
|
3777 | UnionTypeConstituents = 516,
|
3778 | IntersectionTypeConstituents = 520,
|
3779 | ObjectBindingPatternElements = 525136,
|
3780 | ArrayBindingPatternElements = 524880,
|
3781 | ObjectLiteralExpressionProperties = 526226,
|
3782 | ArrayLiteralExpressionElements = 8914,
|
3783 | CommaListElements = 528,
|
3784 | CallExpressionArguments = 2576,
|
3785 | NewExpressionArguments = 18960,
|
3786 | TemplateExpressionSpans = 262144,
|
3787 | SingleLineBlockStatements = 768,
|
3788 | MultiLineBlockStatements = 129,
|
3789 | VariableDeclarationList = 528,
|
3790 | SingleLineFunctionBodyStatements = 768,
|
3791 | MultiLineFunctionBodyStatements = 1,
|
3792 | ClassHeritageClauses = 0,
|
3793 | ClassMembers = 129,
|
3794 | InterfaceMembers = 129,
|
3795 | EnumMembers = 145,
|
3796 | CaseBlockClauses = 129,
|
3797 | NamedImportsOrExportsElements = 525136,
|
3798 | JsxElementOrFragmentChildren = 262144,
|
3799 | JsxElementAttributes = 262656,
|
3800 | CaseOrDefaultClauseStatements = 163969,
|
3801 | HeritageClauseTypes = 528,
|
3802 | SourceFileStatements = 131073,
|
3803 | Decorators = 2146305,
|
3804 | TypeArguments = 53776,
|
3805 | TypeParameters = 53776,
|
3806 | Parameters = 2576,
|
3807 | IndexSignatureParameters = 8848,
|
3808 | JSDocComment = 33
|
3809 | }
|
3810 | export interface UserPreferences {
|
3811 | readonly disableSuggestions?: boolean;
|
3812 | readonly quotePreference?: "auto" | "double" | "single";
|
3813 | readonly includeCompletionsForModuleExports?: boolean;
|
3814 | readonly includeAutomaticOptionalChainCompletions?: boolean;
|
3815 | readonly includeCompletionsWithInsertText?: boolean;
|
3816 | readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative";
|
3817 | /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
|
3818 | readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
|
3819 | readonly allowTextChangesInNewFiles?: boolean;
|
3820 | readonly providePrefixAndSuffixTextForRename?: boolean;
|
3821 | readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
|
3822 | readonly provideRefactorNotApplicableReason?: boolean;
|
3823 | }
|
3824 | /** Represents a bigint literal value without requiring bigint support */
|
3825 | export interface PseudoBigInt {
|
3826 | negative: boolean;
|
3827 | base10Value: string;
|
3828 | }
|
3829 | export {};
|
3830 | }
|
3831 | declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
|
3832 | declare function clearTimeout(handle: any): void;
|
3833 | declare namespace ts {
|
3834 | export enum FileWatcherEventKind {
|
3835 | Created = 0,
|
3836 | Changed = 1,
|
3837 | Deleted = 2
|
3838 | }
|
3839 | export type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind) => void;
|
3840 | export type DirectoryWatcherCallback = (fileName: string) => void;
|
3841 | export interface System {
|
3842 | args: string[];
|
3843 | newLine: string;
|
3844 | useCaseSensitiveFileNames: boolean;
|
3845 | write(s: string): void;
|
3846 | writeOutputIsTTY?(): boolean;
|
3847 | readFile(path: string, encoding?: string): string | undefined;
|
3848 | getFileSize?(path: string): number;
|
3849 | writeFile(path: string, data: string, writeByteOrderMark?: boolean): void;
|
3850 | |
3851 |
|
3852 |
|
3853 |
|
3854 | watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher;
|
3855 | watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher;
|
3856 | resolvePath(path: string): string;
|
3857 | fileExists(path: string): boolean;
|
3858 | directoryExists(path: string): boolean;
|
3859 | createDirectory(path: string): void;
|
3860 | getExecutingFilePath(): string;
|
3861 | getCurrentDirectory(): string;
|
3862 | getDirectories(path: string): string[];
|
3863 | readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
|
3864 | getModifiedTime?(path: string): Date | undefined;
|
3865 | setModifiedTime?(path: string, time: Date): void;
|
3866 | deleteFile?(path: string): void;
|
3867 | |
3868 |
|
3869 |
|
3870 | createHash?(data: string): string;
|
3871 |
|
3872 | createSHA256Hash?(data: string): string;
|
3873 | getMemoryUsage?(): number;
|
3874 | exit(exitCode?: number): void;
|
3875 | realpath?(path: string): string;
|
3876 | setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
|
3877 | clearTimeout?(timeoutId: any): void;
|
3878 | clearScreen?(): void;
|
3879 | base64decode?(input: string): string;
|
3880 | base64encode?(input: string): string;
|
3881 | }
|
3882 | export interface FileWatcher {
|
3883 | close(): void;
|
3884 | }
|
3885 | export function getNodeMajorVersion(): number | undefined;
|
3886 | export let sys: System;
|
3887 | export {};
|
3888 | }
|
3889 | declare namespace ts {
|
3890 | type ErrorCallback = (message: DiagnosticMessage, length: number) => void;
|
3891 | interface Scanner {
|
3892 | getStartPos(): number;
|
3893 | getToken(): SyntaxKind;
|
3894 | getTextPos(): number;
|
3895 | getTokenPos(): number;
|
3896 | getTokenText(): string;
|
3897 | getTokenValue(): string;
|
3898 | hasUnicodeEscape(): boolean;
|
3899 | hasExtendedUnicodeEscape(): boolean;
|
3900 | hasPrecedingLineBreak(): boolean;
|
3901 | isIdentifier(): boolean;
|
3902 | isReservedWord(): boolean;
|
3903 | isUnterminated(): boolean;
|
3904 | reScanGreaterToken(): SyntaxKind;
|
3905 | reScanSlashToken(): SyntaxKind;
|
3906 | reScanAsteriskEqualsToken(): SyntaxKind;
|
3907 | reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind;
|
3908 | reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind;
|
3909 | scanJsxIdentifier(): SyntaxKind;
|
3910 | scanJsxAttributeValue(): SyntaxKind;
|
3911 | reScanJsxAttributeValue(): SyntaxKind;
|
3912 | reScanJsxToken(): JsxTokenSyntaxKind;
|
3913 | reScanLessThanToken(): SyntaxKind;
|
3914 | reScanQuestionToken(): SyntaxKind;
|
3915 | scanJsxToken(): JsxTokenSyntaxKind;
|
3916 | scanJsDocToken(): JSDocSyntaxKind;
|
3917 | scan(): SyntaxKind;
|
3918 | getText(): string;
|
3919 | setText(text: string | undefined, start?: number, length?: number): void;
|
3920 | setOnError(onError: ErrorCallback | undefined): void;
|
3921 | setScriptTarget(scriptTarget: ScriptTarget): void;
|
3922 | setLanguageVariant(variant: LanguageVariant): void;
|
3923 | setTextPos(textPos: number): void;
|
3924 | lookAhead<T>(callback: () => T): T;
|
3925 | scanRange<T>(start: number, length: number, callback: () => T): T;
|
3926 | tryScan<T>(callback: () => T): T;
|
3927 | }
|
3928 | function tokenToString(t: SyntaxKind): string | undefined;
|
3929 | function getPositionOfLineAndCharacter(sourceFile: SourceFileLike, line: number, character: number): number;
|
3930 | function getLineAndCharacterOfPosition(sourceFile: SourceFileLike, position: number): LineAndCharacter;
|
3931 | function isWhiteSpaceLike(ch: number): boolean;
|
3932 | /** Does not include line breaks. For that, see isWhiteSpaceLike. */
|
3933 | function isWhiteSpaceSingleLine(ch: number): boolean;
|
3934 | function isLineBreak(ch: number): boolean;
|
3935 | function couldStartTrivia(text: string, pos: number): boolean;
|
3936 | function forEachLeadingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;
|
3937 | function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
|
3938 | function forEachTrailingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;
|
3939 | function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
|
3940 | function reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U | undefined;
|
3941 | function reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U | undefined;
|
3942 | function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
|
3943 | function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
|
3944 | /** Optionally, get the shebang */
|
3945 | function getShebang(text: string): string | undefined;
|
3946 | function isIdentifierStart(ch: number, languageVersion: ScriptTarget | undefined): boolean;
|
3947 | function isIdentifierPart(ch: number, languageVersion: ScriptTarget | undefined, identifierVariant?: LanguageVariant): boolean;
|
3948 | function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
|
3949 | }
|
3950 | declare namespace ts {
|
3951 | function isExternalModuleNameRelative(moduleName: string): boolean;
|
3952 | function sortAndDeduplicateDiagnostics<T extends Diagnostic>(diagnostics: readonly T[]): SortedReadonlyArray<T>;
|
3953 | function getDefaultLibFileName(options: CompilerOptions): string;
|
3954 | function textSpanEnd(span: TextSpan): number;
|
3955 | function textSpanIsEmpty(span: TextSpan): boolean;
|
3956 | function textSpanContainsPosition(span: TextSpan, position: number): boolean;
|
3957 | function textSpanContainsTextSpan(span: TextSpan, other: TextSpan): boolean;
|
3958 | function textSpanOverlapsWith(span: TextSpan, other: TextSpan): boolean;
|
3959 | function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan | undefined;
|
3960 | function textSpanIntersectsWithTextSpan(span: TextSpan, other: TextSpan): boolean;
|
3961 | function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean;
|
3962 | function decodedTextSpanIntersectsWith(start1: number, length1: number, start2: number, length2: number): boolean;
|
3963 | function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean;
|
3964 | function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan | undefined;
|
3965 | function createTextSpan(start: number, length: number): TextSpan;
|
3966 | function createTextSpanFromBounds(start: number, end: number): TextSpan;
|
3967 | function textChangeRangeNewSpan(range: TextChangeRange): TextSpan;
|
3968 | function textChangeRangeIsUnchanged(range: TextChangeRange): boolean;
|
3969 | function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange;
|
3970 | let unchangedTextChangeRange: TextChangeRange;
|
3971 | /**
|
3972 | * Called to merge all the changes that occurred across several versions of a script snapshot
|
3973 | * into a single change. i.e. if a user keeps making successive edits to a script we will
|
3974 | * have a text change from V1 to V2, V2 to V3, ..., Vn.
|
3975 | *
|
3976 | * This function will then merge those changes into a single change range valid between V1 and
|
3977 | * Vn.
|
3978 | */
|
3979 | function collapseTextChangeRangesAcrossMultipleVersions(changes: readonly TextChangeRange[]): TextChangeRange;
|
3980 | function getTypeParameterOwner(d: Declaration): Declaration | undefined;
|
3981 | type ParameterPropertyDeclaration = ParameterDeclaration & {
|
3982 | parent: ConstructorDeclaration;
|
3983 | name: Identifier;
|
3984 | };
|
3985 | function isParameterPropertyDeclaration(node: Node, parent: Node): node is ParameterPropertyDeclaration;
|
3986 | function isEmptyBindingPattern(node: BindingName): node is BindingPattern;
|
3987 | function isEmptyBindingElement(node: BindingElement): boolean;
|
3988 | function walkUpBindingElementsAndPatterns(binding: BindingElement): VariableDeclaration | ParameterDeclaration;
|
3989 | function getCombinedModifierFlags(node: Declaration): ModifierFlags;
|
3990 | function getCombinedNodeFlags(node: Node): NodeFlags;
|
3991 | /**
|
3992 | * Checks to see if the locale is in the appropriate format,
|
3993 | * and if it is, attempts to set the appropriate language.
|
3994 | */
|
3995 | function validateLocaleAndSetLanguage(locale: string, sys: {
|
3996 | getExecutingFilePath(): string;
|
3997 | resolvePath(path: string): string;
|
3998 | fileExists(fileName: string): boolean;
|
3999 | readFile(fileName: string): string | undefined;
|
4000 | }, errors?: Push<Diagnostic>): void;
|
4001 | function getOriginalNode(node: Node): Node;
|
4002 | function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
|
4003 | function getOriginalNode(node: Node | undefined): Node | undefined;
|
4004 | function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined;
|
4005 | /**
|
4006 | * Gets a value indicating whether a node originated in the parse tree.
|
4007 | *
|
4008 | * @param node The node to test.
|
4009 | */
|
4010 | function isParseTreeNode(node: Node): boolean;
|
4011 | /**
|
4012 | * Gets the original parse tree node for a node.
|
4013 | *
|
4014 | * @param node The original node.
|
4015 | * @returns The original parse tree node if found; otherwise, undefined.
|
4016 | */
|
4017 | function getParseTreeNode(node: Node | undefined): Node | undefined;
|
4018 | /**
|
4019 | * Gets the original parse tree node for a node.
|
4020 | *
|
4021 | * @param node The original node.
|
4022 | * @param nodeTest A callback used to ensure the correct type of parse tree node is returned.
|
4023 | * @returns The original parse tree node if found; otherwise, undefined.
|
4024 | */
|
4025 | function getParseTreeNode<T extends Node>(node: T | undefined, nodeTest?: (node: Node) => node is T): T | undefined;
|
4026 | /** Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' */
|
4027 | function escapeLeadingUnderscores(identifier: string): __String;
|
4028 | /**
|
4029 | * Remove extra underscore from escaped identifier text content.
|
4030 | *
|
4031 | * @param identifier The escaped identifier text.
|
4032 | * @returns The unescaped identifier text.
|
4033 | */
|
4034 | function unescapeLeadingUnderscores(identifier: __String): string;
|
4035 | function idText(identifierOrPrivateName: Identifier | PrivateIdentifier): string;
|
4036 | function symbolName(symbol: Symbol): string;
|
4037 | function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined;
|
4038 | function getNameOfDeclaration(declaration: Declaration | Expression): DeclarationName | undefined;
|
4039 | /**
|
4040 | * Gets the JSDoc parameter tags for the node if present.
|
4041 | *
|
4042 | * @remarks Returns any JSDoc param tag whose name matches the provided
|
4043 | * parameter, whether a param tag on a containing function
|
4044 | * expression, or a param tag on a variable declaration whose
|
4045 | * initializer is the containing function. The tags closest to the
|
4046 | * node are returned first, so in the previous example, the param
|
4047 | * tag on the containing function expression would be first.
|
4048 | *
|
4049 | * For binding patterns, parameter tags are matched by position.
|
4050 | */
|
4051 | function getJSDocParameterTags(param: ParameterDeclaration): readonly JSDocParameterTag[];
|
4052 | /**
|
4053 | * Gets the JSDoc type parameter tags for the node if present.
|
4054 | *
|
4055 | * @remarks Returns any JSDoc template tag whose names match the provided
|
4056 | * parameter, whether a template tag on a containing function
|
4057 | * expression, or a template tag on a variable declaration whose
|
4058 | * initializer is the containing function. The tags closest to the
|
4059 | * node are returned first, so in the previous example, the template
|
4060 | * tag on the containing function expression would be first.
|
4061 | */
|
4062 | function getJSDocTypeParameterTags(param: TypeParameterDeclaration): readonly JSDocTemplateTag[];
|
4063 | /**
|
4064 | * Return true if the node has JSDoc parameter tags.
|
4065 | *
|
4066 | * @remarks Includes parameter tags that are not directly on the node,
|
4067 | * for example on a variable declaration whose initializer is a function expression.
|
4068 | */
|
4069 | function hasJSDocParameterTags(node: FunctionLikeDeclaration | SignatureDeclaration): boolean;
|
4070 | /** Gets the JSDoc augments tag for the node if present */
|
4071 | function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | undefined;
|
4072 | /** Gets the JSDoc implements tags for the node if present */
|
4073 | function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[];
|
4074 | /** Gets the JSDoc class tag for the node if present */
|
4075 | function getJSDocClassTag(node: Node): JSDocClassTag | undefined;
|
4076 | /** Gets the JSDoc public tag for the node if present */
|
4077 | function getJSDocPublicTag(node: Node): JSDocPublicTag | undefined;
|
4078 | /** Gets the JSDoc private tag for the node if present */
|
4079 | function getJSDocPrivateTag(node: Node): JSDocPrivateTag | undefined;
|
4080 | /** Gets the JSDoc protected tag for the node if present */
|
4081 | function getJSDocProtectedTag(node: Node): JSDocProtectedTag | undefined;
|
4082 | /** Gets the JSDoc protected tag for the node if present */
|
4083 | function getJSDocReadonlyTag(node: Node): JSDocReadonlyTag | undefined;
|
4084 | /** Gets the JSDoc deprecated tag for the node if present */
|
4085 | function getJSDocDeprecatedTag(node: Node): JSDocDeprecatedTag | undefined;
|
4086 | /** Gets the JSDoc enum tag for the node if present */
|
4087 | function getJSDocEnumTag(node: Node): JSDocEnumTag | undefined;
|
4088 | /** Gets the JSDoc this tag for the node if present */
|
4089 | function getJSDocThisTag(node: Node): JSDocThisTag | undefined;
|
4090 | /** Gets the JSDoc return tag for the node if present */
|
4091 | function getJSDocReturnTag(node: Node): JSDocReturnTag | undefined;
|
4092 | /** Gets the JSDoc template tag for the node if present */
|
4093 | function getJSDocTemplateTag(node: Node): JSDocTemplateTag | undefined;
|
4094 | /** Gets the JSDoc type tag for the node if present and valid */
|
4095 | function getJSDocTypeTag(node: Node): JSDocTypeTag | undefined;
|
4096 | /**
|
4097 | * Gets the type node for the node if provided via JSDoc.
|
4098 | *
|
4099 | * @remarks The search includes any JSDoc param tag that relates
|
4100 | * to the provided parameter, for example a type tag on the
|
4101 | * parameter itself, or a param tag on a containing function
|
4102 | * expression, or a param tag on a variable declaration whose
|
4103 | * initializer is the containing function. The tags closest to the
|
4104 | * node are examined first, so in the previous example, the type
|
4105 | * tag directly on the node would be returned.
|
4106 | */
|
4107 | function getJSDocType(node: Node): TypeNode | undefined;
|
4108 | /**
|
4109 | * Gets the return type node for the node if provided via JSDoc return tag or type tag.
|
4110 | *
|
4111 | * @remarks `getJSDocReturnTag` just gets the whole JSDoc tag. This function
|
4112 | * gets the type from inside the braces, after the fat arrow, etc.
|
4113 | */
|
4114 | function getJSDocReturnType(node: Node): TypeNode | undefined;
|
4115 | /** Get all JSDoc tags related to a node, including those on parent nodes. */
|
4116 | function getJSDocTags(node: Node): readonly JSDocTag[];
|
4117 | /** Gets all JSDoc tags that match a specified predicate */
|
4118 | function getAllJSDocTags<T extends JSDocTag>(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[];
|
4119 | /** Gets all JSDoc tags of a specified kind */
|
4120 | function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[];
|
4121 | /**
|
4122 | * Gets the effective type parameters. If the node was parsed in a
|
4123 | * JavaScript file, gets the type parameters from the `@template` tag from JSDoc.
|
4124 | */
|
4125 | function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters): readonly TypeParameterDeclaration[];
|
4126 | function getEffectiveConstraintOfTypeParameter(node: TypeParameterDeclaration): TypeNode | undefined;
|
4127 | function isIdentifierOrPrivateIdentifier(node: Node): node is Identifier | PrivateIdentifier;
|
4128 | function isPropertyAccessChain(node: Node): node is PropertyAccessChain;
|
4129 | function isElementAccessChain(node: Node): node is ElementAccessChain;
|
4130 | function isCallChain(node: Node): node is CallChain;
|
4131 | function isOptionalChain(node: Node): node is PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain;
|
4132 | function isNullishCoalesce(node: Node): boolean;
|
4133 | function isConstTypeReference(node: Node): boolean;
|
4134 | function skipPartiallyEmittedExpressions(node: Expression): Expression;
|
4135 | function skipPartiallyEmittedExpressions(node: Node): Node;
|
4136 | function isNonNullChain(node: Node): node is NonNullChain;
|
4137 | function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement;
|
4138 | function isNamedExportBindings(node: Node): node is NamedExportBindings;
|
4139 | function isUnparsedTextLike(node: Node): node is UnparsedTextLike;
|
4140 | function isUnparsedNode(node: Node): node is UnparsedNode;
|
4141 | function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag;
|
4142 | /**
|
4143 | * True if node is of some token syntax kind.
|
4144 | * For example, this is true for an IfKeyword but not for an IfStatement.
|
4145 | * Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail.
|
4146 | */
|
4147 | function isToken(n: Node): boolean;
|
4148 | function isLiteralExpression(node: Node): node is LiteralExpression;
|
4149 | function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken;
|
4150 | function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail;
|
4151 | function isImportOrExportSpecifier(node: Node): node is ImportSpecifier | ExportSpecifier;
|
4152 | function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyCompatibleAliasDeclaration;
|
4153 | function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken;
|
4154 | function isModifier(node: Node): node is Modifier;
|
4155 | function isEntityName(node: Node): node is EntityName;
|
4156 | function isPropertyName(node: Node): node is PropertyName;
|
4157 | function isBindingName(node: Node): node is BindingName;
|
4158 | function isFunctionLike(node: Node): node is SignatureDeclaration;
|
4159 | function isClassElement(node: Node): node is ClassElement;
|
4160 | function isClassLike(node: Node): node is ClassLikeDeclaration;
|
4161 | function isAccessor(node: Node): node is AccessorDeclaration;
|
4162 | function isTypeElement(node: Node): node is TypeElement;
|
4163 | function isClassOrTypeElement(node: Node): node is ClassElement | TypeElement;
|
4164 | function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike;
|
4165 | /**
|
4166 | * Node test that determines whether a node is a valid type node.
|
4167 | * This differs from the `isPartOfTypeNode` function which determines whether a node is *part*
|
4168 | * of a TypeNode.
|
4169 | */
|
4170 | function isTypeNode(node: Node): node is TypeNode;
|
4171 | function isFunctionOrConstructorTypeNode(node: Node): node is FunctionTypeNode | ConstructorTypeNode;
|
4172 | function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName;
|
4173 | function isCallLikeExpression(node: Node): node is CallLikeExpression;
|
4174 | function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression;
|
4175 | function isTemplateLiteral(node: Node): node is TemplateLiteral;
|
4176 | function isAssertionExpression(node: Node): node is AssertionExpression;
|
4177 | function isIterationStatement(node: Node, lookInLabeledStatements: false): node is IterationStatement;
|
4178 | function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement | LabeledStatement;
|
4179 | function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement;
|
4180 | function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause;
|
4181 | /** True if node is of a kind that may contain comment text. */
|
4182 | function isJSDocCommentContainingNode(node: Node): boolean;
|
4183 | function isSetAccessor(node: Node): node is SetAccessorDeclaration;
|
4184 | function isGetAccessor(node: Node): node is GetAccessorDeclaration;
|
4185 | /** True if has initializer node attached to it. */
|
4186 | function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer;
|
4187 | function isObjectLiteralElement(node: Node): node is ObjectLiteralElement;
|
4188 | function isStringLiteralLike(node: Node): node is StringLiteralLike;
|
4189 | }
|
4190 | declare namespace ts {
|
4191 | const factory: NodeFactory;
|
4192 | function createUnparsedSourceFile(text: string): UnparsedSource;
|
4193 | function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource;
|
4194 | function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;
|
4195 | function createInputFiles(javascriptText: string, declarationText: string): InputFiles;
|
4196 | function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles;
|
4197 | function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles;
|
4198 | /**
|
4199 | * Create an external source map source file reference
|
4200 | */
|
4201 | function createSourceMapSource(fileName: string, text: string, skipTrivia?: (pos: number) => number): SourceMapSource;
|
4202 | function setOriginalNode<T extends Node>(node: T, original: Node | undefined): T;
|
4203 | }
|
4204 | declare namespace ts {
|
4205 | /**
|
4206 | * Clears any `EmitNode` entries from parse-tree nodes.
|
4207 | * @param sourceFile A source file.
|
4208 | */
|
4209 | function disposeEmitNodes(sourceFile: SourceFile | undefined): void;
|
4210 | /**
|
4211 | * Sets flags that control emit behavior of a node.
|
4212 | */
|
4213 | function setEmitFlags<T extends Node>(node: T, emitFlags: EmitFlags): T;
|
4214 | /**
|
4215 | * Gets a custom text range to use when emitting source maps.
|
4216 | */
|
4217 | function getSourceMapRange(node: Node): SourceMapRange;
|
4218 | /**
|
4219 | * Sets a custom text range to use when emitting source maps.
|
4220 | */
|
4221 | function setSourceMapRange<T extends Node>(node: T, range: SourceMapRange | undefined): T;
|
4222 | /**
|
4223 | * Gets the TextRange to use for source maps for a token of a node.
|
4224 | */
|
4225 | function getTokenSourceMapRange(node: Node, token: SyntaxKind): SourceMapRange | undefined;
|
4226 | /**
|
4227 | * Sets the TextRange to use for source maps for a token of a node.
|
4228 | */
|
4229 | function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: SourceMapRange | undefined): T;
|
4230 | /**
|
4231 | * Gets a custom text range to use when emitting comments.
|
4232 | */
|
4233 | function getCommentRange(node: Node): TextRange;
|
4234 | /**
|
4235 | * Sets a custom text range to use when emitting comments.
|
4236 | */
|
4237 | function setCommentRange<T extends Node>(node: T, range: TextRange): T;
|
4238 | function getSyntheticLeadingComments(node: Node): SynthesizedComment[] | undefined;
|
4239 | function setSyntheticLeadingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T;
|
4240 | function addSyntheticLeadingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
|
4241 | function getSyntheticTrailingComments(node: Node): SynthesizedComment[] | undefined;
|
4242 | function setSyntheticTrailingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T;
|
4243 | function addSyntheticTrailingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
|
4244 | function moveSyntheticComments<T extends Node>(node: T, original: Node): T;
|
4245 | /**
|
4246 | * Gets the constant value to emit for an expression representing an enum.
|
4247 | */
|
4248 | function getConstantValue(node: AccessExpression): string | number | undefined;
|
4249 | /**
|
4250 | * Sets the constant value to emit for an expression.
|
4251 | */
|
4252 | function setConstantValue(node: AccessExpression, value: string | number): AccessExpression;
|
4253 | /**
|
4254 | * Adds an EmitHelper to a node.
|
4255 | */
|
4256 | function addEmitHelper<T extends Node>(node: T, helper: EmitHelper): T;
|
4257 | /**
|
4258 | * Add EmitHelpers to a node.
|
4259 | */
|
4260 | function addEmitHelpers<T extends Node>(node: T, helpers: EmitHelper[] | undefined): T;
|
4261 | /**
|
4262 | * Removes an EmitHelper from a node.
|
4263 | */
|
4264 | function removeEmitHelper(node: Node, helper: EmitHelper): boolean;
|
4265 | /**
|
4266 | * Gets the EmitHelpers of a node.
|
4267 | */
|
4268 | function getEmitHelpers(node: Node): EmitHelper[] | undefined;
|
4269 | /**
|
4270 | * Moves matching emit helpers from a source node to a target node.
|
4271 | */
|
4272 | function moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) => boolean): void;
|
4273 | }
|
4274 | declare namespace ts {
|
4275 | function isNumericLiteral(node: Node): node is NumericLiteral;
|
4276 | function isBigIntLiteral(node: Node): node is BigIntLiteral;
|
4277 | function isStringLiteral(node: Node): node is StringLiteral;
|
4278 | function isJsxText(node: Node): node is JsxText;
|
4279 | function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral;
|
4280 | function isNoSubstitutionTemplateLiteral(node: Node): node is NoSubstitutionTemplateLiteral;
|
4281 | function isTemplateHead(node: Node): node is TemplateHead;
|
4282 | function isTemplateMiddle(node: Node): node is TemplateMiddle;
|
4283 | function isTemplateTail(node: Node): node is TemplateTail;
|
4284 | function isIdentifier(node: Node): node is Identifier;
|
4285 | function isQualifiedName(node: Node): node is QualifiedName;
|
4286 | function isComputedPropertyName(node: Node): node is ComputedPropertyName;
|
4287 | function isPrivateIdentifier(node: Node): node is PrivateIdentifier;
|
4288 | function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration;
|
4289 | function isParameter(node: Node): node is ParameterDeclaration;
|
4290 | function isDecorator(node: Node): node is Decorator;
|
4291 | function isPropertySignature(node: Node): node is PropertySignature;
|
4292 | function isPropertyDeclaration(node: Node): node is PropertyDeclaration;
|
4293 | function isMethodSignature(node: Node): node is MethodSignature;
|
4294 | function isMethodDeclaration(node: Node): node is MethodDeclaration;
|
4295 | function isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
|
4296 | function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
|
4297 | function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
|
4298 | function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration;
|
4299 | function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration;
|
4300 | function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration;
|
4301 | function isTypePredicateNode(node: Node): node is TypePredicateNode;
|
4302 | function isTypeReferenceNode(node: Node): node is TypeReferenceNode;
|
4303 | function isFunctionTypeNode(node: Node): node is FunctionTypeNode;
|
4304 | function isConstructorTypeNode(node: Node): node is ConstructorTypeNode;
|
4305 | function isTypeQueryNode(node: Node): node is TypeQueryNode;
|
4306 | function isTypeLiteralNode(node: Node): node is TypeLiteralNode;
|
4307 | function isArrayTypeNode(node: Node): node is ArrayTypeNode;
|
4308 | function isTupleTypeNode(node: Node): node is TupleTypeNode;
|
4309 | function isNamedTupleMember(node: Node): node is NamedTupleMember;
|
4310 | function isOptionalTypeNode(node: Node): node is OptionalTypeNode;
|
4311 | function isRestTypeNode(node: Node): node is RestTypeNode;
|
4312 | function isUnionTypeNode(node: Node): node is UnionTypeNode;
|
4313 | function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode;
|
4314 | function isConditionalTypeNode(node: Node): node is ConditionalTypeNode;
|
4315 | function isInferTypeNode(node: Node): node is InferTypeNode;
|
4316 | function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode;
|
4317 | function isThisTypeNode(node: Node): node is ThisTypeNode;
|
4318 | function isTypeOperatorNode(node: Node): node is TypeOperatorNode;
|
4319 | function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode;
|
4320 | function isMappedTypeNode(node: Node): node is MappedTypeNode;
|
4321 | function isLiteralTypeNode(node: Node): node is LiteralTypeNode;
|
4322 | function isImportTypeNode(node: Node): node is ImportTypeNode;
|
4323 | function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
|
4324 | function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
|
4325 | function isBindingElement(node: Node): node is BindingElement;
|
4326 | function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression;
|
4327 | function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression;
|
4328 | function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression;
|
4329 | function isElementAccessExpression(node: Node): node is ElementAccessExpression;
|
4330 | function isCallExpression(node: Node): node is CallExpression;
|
4331 | function isNewExpression(node: Node): node is NewExpression;
|
4332 | function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression;
|
4333 | function isTypeAssertionExpression(node: Node): node is TypeAssertion;
|
4334 | function isParenthesizedExpression(node: Node): node is ParenthesizedExpression;
|
4335 | function isFunctionExpression(node: Node): node is FunctionExpression;
|
4336 | function isArrowFunction(node: Node): node is ArrowFunction;
|
4337 | function isDeleteExpression(node: Node): node is DeleteExpression;
|
4338 | function isTypeOfExpression(node: Node): node is TypeOfExpression;
|
4339 | function isVoidExpression(node: Node): node is VoidExpression;
|
4340 | function isAwaitExpression(node: Node): node is AwaitExpression;
|
4341 | function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression;
|
4342 | function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression;
|
4343 | function isBinaryExpression(node: Node): node is BinaryExpression;
|
4344 | function isConditionalExpression(node: Node): node is ConditionalExpression;
|
4345 | function isTemplateExpression(node: Node): node is TemplateExpression;
|
4346 | function isYieldExpression(node: Node): node is YieldExpression;
|
4347 | function isSpreadElement(node: Node): node is SpreadElement;
|
4348 | function isClassExpression(node: Node): node is ClassExpression;
|
4349 | function isOmittedExpression(node: Node): node is OmittedExpression;
|
4350 | function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments;
|
4351 | function isAsExpression(node: Node): node is AsExpression;
|
4352 | function isNonNullExpression(node: Node): node is NonNullExpression;
|
4353 | function isMetaProperty(node: Node): node is MetaProperty;
|
4354 | function isSyntheticExpression(node: Node): node is SyntheticExpression;
|
4355 | function isPartiallyEmittedExpression(node: Node): node is PartiallyEmittedExpression;
|
4356 | function isCommaListExpression(node: Node): node is CommaListExpression;
|
4357 | function isTemplateSpan(node: Node): node is TemplateSpan;
|
4358 | function isSemicolonClassElement(node: Node): node is SemicolonClassElement;
|
4359 | function isBlock(node: Node): node is Block;
|
4360 | function isVariableStatement(node: Node): node is VariableStatement;
|
4361 | function isEmptyStatement(node: Node): node is EmptyStatement;
|
4362 | function isExpressionStatement(node: Node): node is ExpressionStatement;
|
4363 | function isIfStatement(node: Node): node is IfStatement;
|
4364 | function isDoStatement(node: Node): node is DoStatement;
|
4365 | function isWhileStatement(node: Node): node is WhileStatement;
|
4366 | function isForStatement(node: Node): node is ForStatement;
|
4367 | function isForInStatement(node: Node): node is ForInStatement;
|
4368 | function isForOfStatement(node: Node): node is ForOfStatement;
|
4369 | function isContinueStatement(node: Node): node is ContinueStatement;
|
4370 | function isBreakStatement(node: Node): node is BreakStatement;
|
4371 | function isReturnStatement(node: Node): node is ReturnStatement;
|
4372 | function isWithStatement(node: Node): node is WithStatement;
|
4373 | function isSwitchStatement(node: Node): node is SwitchStatement;
|
4374 | function isLabeledStatement(node: Node): node is LabeledStatement;
|
4375 | function isThrowStatement(node: Node): node is ThrowStatement;
|
4376 | function isTryStatement(node: Node): node is TryStatement;
|
4377 | function isDebuggerStatement(node: Node): node is DebuggerStatement;
|
4378 | function isVariableDeclaration(node: Node): node is VariableDeclaration;
|
4379 | function isVariableDeclarationList(node: Node): node is VariableDeclarationList;
|
4380 | function isFunctionDeclaration(node: Node): node is FunctionDeclaration;
|
4381 | function isClassDeclaration(node: Node): node is ClassDeclaration;
|
4382 | function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration;
|
4383 | function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration;
|
4384 | function isEnumDeclaration(node: Node): node is EnumDeclaration;
|
4385 | function isModuleDeclaration(node: Node): node is ModuleDeclaration;
|
4386 | function isModuleBlock(node: Node): node is ModuleBlock;
|
4387 | function isCaseBlock(node: Node): node is CaseBlock;
|
4388 | function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration;
|
4389 | function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration;
|
4390 | function isImportDeclaration(node: Node): node is ImportDeclaration;
|
4391 | function isImportClause(node: Node): node is ImportClause;
|
4392 | function isNamespaceImport(node: Node): node is NamespaceImport;
|
4393 | function isNamespaceExport(node: Node): node is NamespaceExport;
|
4394 | function isNamedImports(node: Node): node is NamedImports;
|
4395 | function isImportSpecifier(node: Node): node is ImportSpecifier;
|
4396 | function isExportAssignment(node: Node): node is ExportAssignment;
|
4397 | function isExportDeclaration(node: Node): node is ExportDeclaration;
|
4398 | function isNamedExports(node: Node): node is NamedExports;
|
4399 | function isExportSpecifier(node: Node): node is ExportSpecifier;
|
4400 | function isMissingDeclaration(node: Node): node is MissingDeclaration;
|
4401 | function isNotEmittedStatement(node: Node): node is NotEmittedStatement;
|
4402 | function isExternalModuleReference(node: Node): node is ExternalModuleReference;
|
4403 | function isJsxElement(node: Node): node is JsxElement;
|
4404 | function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement;
|
4405 | function isJsxOpeningElement(node: Node): node is JsxOpeningElement;
|
4406 | function isJsxClosingElement(node: Node): node is JsxClosingElement;
|
4407 | function isJsxFragment(node: Node): node is JsxFragment;
|
4408 | function isJsxOpeningFragment(node: Node): node is JsxOpeningFragment;
|
4409 | function isJsxClosingFragment(node: Node): node is JsxClosingFragment;
|
4410 | function isJsxAttribute(node: Node): node is JsxAttribute;
|
4411 | function isJsxAttributes(node: Node): node is JsxAttributes;
|
4412 | function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
|
4413 | function isJsxExpression(node: Node): node is JsxExpression;
|
4414 | function isCaseClause(node: Node): node is CaseClause;
|
4415 | function isDefaultClause(node: Node): node is DefaultClause;
|
4416 | function isHeritageClause(node: Node): node is HeritageClause;
|
4417 | function isCatchClause(node: Node): node is CatchClause;
|
4418 | function isPropertyAssignment(node: Node): node is PropertyAssignment;
|
4419 | function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment;
|
4420 | function isSpreadAssignment(node: Node): node is SpreadAssignment;
|
4421 | function isEnumMember(node: Node): node is EnumMember;
|
4422 | function isUnparsedPrepend(node: Node): node is UnparsedPrepend;
|
4423 | function isSourceFile(node: Node): node is SourceFile;
|
4424 | function isBundle(node: Node): node is Bundle;
|
4425 | function isUnparsedSource(node: Node): node is UnparsedSource;
|
4426 | function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
|
4427 | function isJSDocAllType(node: Node): node is JSDocAllType;
|
4428 | function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
|
4429 | function isJSDocNullableType(node: Node): node is JSDocNullableType;
|
4430 | function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType;
|
4431 | function isJSDocOptionalType(node: Node): node is JSDocOptionalType;
|
4432 | function isJSDocFunctionType(node: Node): node is JSDocFunctionType;
|
4433 | function isJSDocVariadicType(node: Node): node is JSDocVariadicType;
|
4434 | function isJSDocNamepathType(node: Node): node is JSDocNamepathType;
|
4435 | function isJSDoc(node: Node): node is JSDoc;
|
4436 | function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral;
|
4437 | function isJSDocSignature(node: Node): node is JSDocSignature;
|
4438 | function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag;
|
4439 | function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag;
|
4440 | function isJSDocClassTag(node: Node): node is JSDocClassTag;
|
4441 | function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag;
|
4442 | function isJSDocPublicTag(node: Node): node is JSDocPublicTag;
|
4443 | function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag;
|
4444 | function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag;
|
4445 | function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag;
|
4446 | function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag;
|
4447 | function isJSDocEnumTag(node: Node): node is JSDocEnumTag;
|
4448 | function isJSDocParameterTag(node: Node): node is JSDocParameterTag;
|
4449 | function isJSDocReturnTag(node: Node): node is JSDocReturnTag;
|
4450 | function isJSDocThisTag(node: Node): node is JSDocThisTag;
|
4451 | function isJSDocTypeTag(node: Node): node is JSDocTypeTag;
|
4452 | function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag;
|
4453 | function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag;
|
4454 | function isJSDocUnknownTag(node: Node): node is JSDocUnknownTag;
|
4455 | function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
|
4456 | function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag;
|
4457 | }
|
4458 | declare namespace ts {
|
4459 | function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
|
4460 | }
|
4461 | declare namespace ts {
|
4462 | /**
|
4463 | * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
|
4464 | * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
|
4465 | * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
|
4466 | * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
|
4467 | *
|
4468 | * @param node a given node to visit its children
|
4469 | * @param cbNode a callback to be invoked for all child nodes
|
4470 | * @param cbNodes a callback to be invoked for embedded array
|
4471 | *
|
4472 | * @remarks `forEachChild` must visit the children of a node in the order
|
4473 | * that they appear in the source code. The language service depends on this property to locate nodes by position.
|
4474 | */
|
4475 | export function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
|
4476 | export function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile;
|
4477 | export function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined;
|
4478 | /**
|
4479 | * Parse json text into SyntaxTree and return node and parse errors if any
|
4480 | * @param fileName
|
4481 | * @param sourceText
|
4482 | */
|
4483 | export function parseJsonText(fileName: string, sourceText: string): JsonSourceFile;
|
4484 | export function isExternalModule(file: SourceFile): boolean;
|
4485 | export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
|
4486 | export {};
|
4487 | }
|
4488 | declare namespace ts {
|
4489 | export function parseCommandLine(commandLine: readonly string[], readFile?: (path: string) => string | undefined): ParsedCommandLine;
|
4490 | export type DiagnosticReporter = (diagnostic: Diagnostic) => void;
|
4491 | |
4492 |
|
4493 |
|
4494 | export interface ConfigFileDiagnosticsReporter {
|
4495 | |
4496 |
|
4497 |
|
4498 | onUnRecoverableConfigFileDiagnostic: DiagnosticReporter;
|
4499 | }
|
4500 | |
4501 |
|
4502 |
|
4503 | export interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter {
|
4504 | getCurrentDirectory(): string;
|
4505 | }
|
4506 | |
4507 |
|
4508 |
|
4509 | export function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions, host: ParseConfigFileHost, extendedConfigCache?: Map<ExtendedConfigCacheEntry>, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): ParsedCommandLine | undefined;
|
4510 | |
4511 |
|
4512 |
|
4513 |
|
4514 | export function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): {
|
4515 | config?: any;
|
4516 | error?: Diagnostic;
|
4517 | };
|
4518 | |
4519 |
|
4520 |
|
4521 |
|
4522 |
|
4523 | export function parseConfigFileTextToJson(fileName: string, jsonText: string): {
|
4524 | config?: any;
|
4525 | error?: Diagnostic;
|
4526 | };
|
4527 | |
4528 |
|
4529 |
|
4530 |
|
4531 | export function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile;
|
4532 | |
4533 |
|
4534 |
|
4535 | export function convertToObject(sourceFile: JsonSourceFile, errors: Push<Diagnostic>): any;
|
4536 | |
4537 |
|
4538 |
|
4539 |
|
4540 |
|
4541 |
|
4542 |
|
4543 | export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine;
|
4544 | |
4545 |
|
4546 |
|
4547 |
|
4548 |
|
4549 |
|
4550 |
|
4551 | export function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine;
|
4552 | export interface ParsedTsconfig {
|
4553 | raw: any;
|
4554 | options?: CompilerOptions;
|
4555 | watchOptions?: WatchOptions;
|
4556 | typeAcquisition?: TypeAcquisition;
|
4557 | |
4558 |
|
4559 |
|
4560 | extendedConfigPath?: string;
|
4561 | }
|
4562 | export interface ExtendedConfigCacheEntry {
|
4563 | extendedResult: TsConfigSourceFile;
|
4564 | extendedConfig: ParsedTsconfig | undefined;
|
4565 | }
|
4566 | export function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
|
4567 | options: CompilerOptions;
|
4568 | errors: Diagnostic[];
|
4569 | };
|
4570 | export function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
|
4571 | options: TypeAcquisition;
|
4572 | errors: Diagnostic[];
|
4573 | };
|
4574 | export {};
|
4575 | }
|
4576 | declare namespace ts {
|
4577 | function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined;
|
4578 | |
4579 |
|
4580 |
|
4581 |
|
4582 |
|
4583 | function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
|
4584 | |
4585 |
|
4586 |
|
4587 |
|
4588 |
|
4589 |
|
4590 |
|
4591 |
|
4592 | function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
|
4593 | |
4594 |
|
4595 |
|
4596 |
|
4597 | interface ModuleResolutionCache extends NonRelativeModuleNameResolutionCache {
|
4598 | getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): Map<ResolvedModuleWithFailedLookupLocations>;
|
4599 | }
|
4600 | |
4601 |
|
4602 |
|
4603 |
|
4604 | interface NonRelativeModuleNameResolutionCache {
|
4605 | getOrCreateCacheForModuleName(nonRelativeModuleName: string, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
|
4606 | }
|
4607 | interface PerModuleNameCache {
|
4608 | get(directory: string): ResolvedModuleWithFailedLookupLocations | undefined;
|
4609 | set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void;
|
4610 | }
|
4611 | function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
|
4612 | function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations | undefined;
|
4613 | function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
|
4614 | function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
|
4615 | function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
|
4616 | }
|
4617 | declare namespace ts {
|
4618 | |
4619 |
|
4620 |
|
4621 |
|
4622 |
|
4623 |
|
4624 |
|
4625 |
|
4626 | function visitNode<T extends Node>(node: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T;
|
4627 | |
4628 |
|
4629 |
|
4630 |
|
4631 |
|
4632 |
|
4633 |
|
4634 |
|
4635 | function visitNode<T extends Node>(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T | undefined;
|
4636 | |
4637 |
|
4638 |
|
4639 |
|
4640 |
|
4641 |
|
4642 |
|
4643 |
|
4644 |
|
4645 | function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
|
4646 | |
4647 |
|
4648 |
|
4649 |
|
4650 |
|
4651 |
|
4652 |
|
4653 |
|
4654 |
|
4655 | function visitNodes<T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined;
|
4656 | |
4657 |
|
4658 |
|
4659 |
|
4660 | function visitLexicalEnvironment(statements: NodeArray<Statement>, visitor: Visitor, context: TransformationContext, start?: number, ensureUseStrict?: boolean, nodesVisitor?: NodesVisitor): NodeArray<Statement>;
|
4661 | |
4662 |
|
4663 |
|
4664 |
|
4665 | function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray<ParameterDeclaration>;
|
4666 | function visitParameterList(nodes: NodeArray<ParameterDeclaration> | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray<ParameterDeclaration> | undefined;
|
4667 | |
4668 |
|
4669 |
|
4670 |
|
4671 | function visitFunctionBody(node: FunctionBody, visitor: Visitor, context: TransformationContext): FunctionBody;
|
4672 | |
4673 |
|
4674 |
|
4675 |
|
4676 | function visitFunctionBody(node: FunctionBody | undefined, visitor: Visitor, context: TransformationContext): FunctionBody | undefined;
|
4677 | |
4678 |
|
4679 |
|
4680 |
|
4681 | function visitFunctionBody(node: ConciseBody, visitor: Visitor, context: TransformationContext): ConciseBody;
|
4682 | |
4683 |
|
4684 |
|
4685 |
|
4686 |
|
4687 |
|
4688 |
|
4689 | function visitEachChild<T extends Node>(node: T, visitor: Visitor, context: TransformationContext): T;
|
4690 | |
4691 |
|
4692 |
|
4693 |
|
4694 |
|
4695 |
|
4696 |
|
4697 | function visitEachChild<T extends Node>(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined;
|
4698 | }
|
4699 | declare namespace ts {
|
4700 | function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined;
|
4701 | function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[];
|
4702 | function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer;
|
4703 | }
|
4704 | declare namespace ts {
|
4705 | export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string | undefined;
|
4706 | export function resolveTripleslashReference(moduleName: string, containingFile: string): string;
|
4707 | export function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
|
4708 | export function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
|
4709 | export interface FormatDiagnosticsHost {
|
4710 | getCurrentDirectory(): string;
|
4711 | getCanonicalFileName(fileName: string): string;
|
4712 | getNewLine(): string;
|
4713 | }
|
4714 | export function formatDiagnostics(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string;
|
4715 | export function formatDiagnostic(diagnostic: Diagnostic, host: FormatDiagnosticsHost): string;
|
4716 | export function formatDiagnosticsWithColorAndContext(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string;
|
4717 | export function flattenDiagnosticMessageText(diag: string | DiagnosticMessageChain | undefined, newLine: string, indent?: number): string;
|
4718 | export function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[];
|
4719 | |
4720 |
|
4721 |
|
4722 |
|
4723 |
|
4724 |
|
4725 |
|
4726 |
|
4727 |
|
4728 |
|
4729 | export function createProgram(createProgramOptions: CreateProgramOptions): Program;
|
4730 | |
4731 |
|
4732 |
|
4733 |
|
4734 |
|
4735 |
|
4736 |
|
4737 |
|
4738 |
|
4739 |
|
4740 |
|
4741 |
|
4742 |
|
4743 |
|
4744 | export function createProgram(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): Program;
|
4745 | export interface ResolveProjectReferencePathHost {
|
4746 | fileExists(fileName: string): boolean;
|
4747 | }
|
4748 | |
4749 |
|
4750 |
|
4751 |
|
4752 | export function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName;
|
4753 | export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName;
|
4754 | export {};
|
4755 | }
|
4756 | declare namespace ts {
|
4757 | interface EmitOutput {
|
4758 | outputFiles: OutputFile[];
|
4759 | emitSkipped: boolean;
|
4760 | }
|
4761 | interface OutputFile {
|
4762 | name: string;
|
4763 | writeByteOrderMark: boolean;
|
4764 | text: string;
|
4765 | }
|
4766 | }
|
4767 | declare namespace ts {
|
4768 | type AffectedFileResult<T> = {
|
4769 | result: T;
|
4770 | affected: SourceFile | Program;
|
4771 | } | undefined;
|
4772 | interface BuilderProgramHost {
|
4773 | |
4774 |
|
4775 |
|
4776 | useCaseSensitiveFileNames(): boolean;
|
4777 | |
4778 |
|
4779 |
|
4780 | createHash?: (data: string) => string;
|
4781 | |
4782 |
|
4783 |
|
4784 |
|
4785 | writeFile?: WriteFileCallback;
|
4786 | }
|
4787 | |
4788 |
|
4789 |
|
4790 | interface BuilderProgram {
|
4791 | |
4792 |
|
4793 |
|
4794 | getProgram(): Program;
|
4795 | |
4796 |
|
4797 |
|
4798 | getCompilerOptions(): CompilerOptions;
|
4799 | |
4800 |
|
4801 |
|
4802 | getSourceFile(fileName: string): SourceFile | undefined;
|
4803 | |
4804 |
|
4805 |
|
4806 | getSourceFiles(): readonly SourceFile[];
|
4807 | |
4808 |
|
4809 |
|
4810 | getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
|
4811 | |
4812 |
|
4813 |
|
4814 | getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
|
4815 | |
4816 |
|
4817 |
|
4818 | getConfigFileParsingDiagnostics(): readonly Diagnostic[];
|
4819 | |
4820 |
|
4821 |
|
4822 | getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
|
4823 | |
4824 |
|
4825 |
|
4826 | getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
|
4827 | |
4828 |
|
4829 |
|
4830 | getAllDependencies(sourceFile: SourceFile): readonly string[];
|
4831 | |
4832 |
|
4833 |
|
4834 |
|
4835 |
|
4836 |
|
4837 |
|
4838 |
|
4839 | getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
|
4840 | |
4841 |
|
4842 |
|
4843 |
|
4844 |
|
4845 |
|
4846 |
|
4847 |
|
4848 |
|
4849 |
|
4850 |
|
4851 | emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult;
|
4852 | |
4853 |
|
4854 |
|
4855 | getCurrentDirectory(): string;
|
4856 | }
|
4857 | |
4858 |
|
4859 |
|
4860 | interface SemanticDiagnosticsBuilderProgram extends BuilderProgram {
|
4861 | |
4862 |
|
4863 |
|
4864 |
|
4865 | getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>;
|
4866 | }
|
4867 | |
4868 |
|
4869 |
|
4870 |
|
4871 | interface EmitAndSemanticDiagnosticsBuilderProgram extends SemanticDiagnosticsBuilderProgram {
|
4872 | |
4873 |
|
4874 |
|
4875 |
|
4876 |
|
4877 | emitNextAffectedFile(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): AffectedFileResult<EmitResult>;
|
4878 | }
|
4879 | |
4880 |
|
4881 |
|
4882 | function createSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): SemanticDiagnosticsBuilderProgram;
|
4883 | function createSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): SemanticDiagnosticsBuilderProgram;
|
4884 | |
4885 |
|
4886 |
|
4887 |
|
4888 | function createEmitAndSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): EmitAndSemanticDiagnosticsBuilderProgram;
|
4889 | function createEmitAndSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): EmitAndSemanticDiagnosticsBuilderProgram;
|
4890 | |
4891 |
|
4892 |
|
4893 | function createAbstractBuilder(newProgram: Program, host: BuilderProgramHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): BuilderProgram;
|
4894 | function createAbstractBuilder(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): BuilderProgram;
|
4895 | }
|
4896 | declare namespace ts {
|
4897 | interface ReadBuildProgramHost {
|
4898 | useCaseSensitiveFileNames(): boolean;
|
4899 | getCurrentDirectory(): string;
|
4900 | readFile(fileName: string): string | undefined;
|
4901 | }
|
4902 | function readBuilderProgram(compilerOptions: CompilerOptions, host: ReadBuildProgramHost): EmitAndSemanticDiagnosticsBuilderProgram | undefined;
|
4903 | function createIncrementalCompilerHost(options: CompilerOptions, system?: System): CompilerHost;
|
4904 | interface IncrementalProgramOptions<T extends BuilderProgram> {
|
4905 | rootNames: readonly string[];
|
4906 | options: CompilerOptions;
|
4907 | configFileParsingDiagnostics?: readonly Diagnostic[];
|
4908 | projectReferences?: readonly ProjectReference[];
|
4909 | host?: CompilerHost;
|
4910 | createProgram?: CreateProgram<T>;
|
4911 | }
|
4912 | function createIncrementalProgram<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>({ rootNames, options, configFileParsingDiagnostics, projectReferences, host, createProgram }: IncrementalProgramOptions<T>): T;
|
4913 | type WatchStatusReporter = (diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number) => void;
|
4914 |
|
4915 | type CreateProgram<T extends BuilderProgram> = (rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: T, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[] | undefined) => T;
|
4916 |
|
4917 | interface WatchHost {
|
4918 |
|
4919 | onWatchStatusChange?(diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number): void;
|
4920 |
|
4921 | watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: CompilerOptions): FileWatcher;
|
4922 |
|
4923 | watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: CompilerOptions): FileWatcher;
|
4924 |
|
4925 | setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
|
4926 | /** If provided, will be used to reset existing delayed compilation */
|
4927 | clearTimeout?(timeoutId: any): void;
|
4928 | }
|
4929 | interface ProgramHost<T extends BuilderProgram> {
|
4930 | /**
|
4931 | * Used to create the program when need for program creation or recreation detected
|
4932 | */
|
4933 | createProgram: CreateProgram<T>;
|
4934 | useCaseSensitiveFileNames(): boolean;
|
4935 | getNewLine(): string;
|
4936 | getCurrentDirectory(): string;
|
4937 | getDefaultLibFileName(options: CompilerOptions): string;
|
4938 | getDefaultLibLocation?(): string;
|
4939 | createHash?(data: string): string;
|
4940 | /**
|
4941 | * Use to check file presence for source files and
|
4942 | * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well
|
4943 | */
|
4944 | fileExists(path: string): boolean;
|
4945 | /**
|
4946 | * Use to read file text for source files and
|
4947 | * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well
|
4948 | */
|
4949 | readFile(path: string, encoding?: string): string | undefined;
|
4950 | /** If provided, used for module resolution as well as to handle directory structure */
|
4951 | directoryExists?(path: string): boolean;
|
4952 | /** If provided, used in resolutions as well as handling directory structure */
|
4953 | getDirectories?(path: string): string[];
|
4954 | /** If provided, used to cache and handle directory structure modifications */
|
4955 | readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
|
4956 | /** Symbol links resolution */
|
4957 | realpath?(path: string): string;
|
4958 | /** If provided would be used to write log about compilation */
|
4959 | trace?(s: string): void;
|
4960 | /** If provided is used to get the environment variable */
|
4961 | getEnvironmentVariable?(name: string): string | undefined;
|
4962 | /** If provided, used to resolve the module names, otherwise typescript's default module resolution */
|
4963 | resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedModule | undefined)[];
|
4964 | /** If provided, used to resolve type reference directives, otherwise typescript's default resolution */
|
4965 | resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
|
4966 | }
|
4967 | interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost {
|
4968 | /** Instead of using output d.ts file from project reference, use its source file */
|
4969 | useSourceOfProjectReferenceRedirect?(): boolean;
|
4970 | /** If provided, callback to invoke after every new program creation */
|
4971 | afterProgramCreate?(program: T): void;
|
4972 | }
|
4973 | /**
|
4974 | * Host to create watch with root files and options
|
4975 | */
|
4976 | interface WatchCompilerHostOfFilesAndCompilerOptions<T extends BuilderProgram> extends WatchCompilerHost<T> {
|
4977 | /** root files to use to generate program */
|
4978 | rootFiles: string[];
|
4979 | /** Compiler options */
|
4980 | options: CompilerOptions;
|
4981 | watchOptions?: WatchOptions;
|
4982 | /** Project References */
|
4983 | projectReferences?: readonly ProjectReference[];
|
4984 | }
|
4985 | /**
|
4986 | * Host to create watch with config file
|
4987 | */
|
4988 | interface WatchCompilerHostOfConfigFile<T extends BuilderProgram> extends WatchCompilerHost<T>, ConfigFileDiagnosticsReporter {
|
4989 | /** Name of the config file to compile */
|
4990 | configFileName: string;
|
4991 | /** Options to extend */
|
4992 | optionsToExtend?: CompilerOptions;
|
4993 | watchOptionsToExtend?: WatchOptions;
|
4994 | extraFileExtensions?: readonly FileExtensionInfo[];
|
4995 | /**
|
4996 | * Used to generate source file names from the config file and its include, exclude, files rules
|
4997 | * and also to cache the directory stucture
|
4998 | */
|
4999 | readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
|
5000 | }
|
5001 | interface Watch<T> {
|
5002 | /** Synchronize with host and get updated program */
|
5003 | getProgram(): T;
|
5004 | /** Closes the watch */
|
5005 | close(): void;
|
5006 | }
|
5007 | /**
|
5008 | * Creates the watch what generates program using the config file
|
5009 | */
|
5010 | interface WatchOfConfigFile<T> extends Watch<T> {
|
5011 | }
|
5012 | /**
|
5013 | * Creates the watch that generates program using the root files and compiler options
|
5014 | */
|
5015 | interface WatchOfFilesAndCompilerOptions<T> extends Watch<T> {
|
5016 | /** Updates the root files in the program, only if this is not config file compilation */
|
5017 | updateRootFileNames(fileNames: string[]): void;
|
5018 | }
|
5019 | /**
|
5020 | * Create the watch compiler host for either configFile or fileNames and its options
|
5021 | */
|
5022 | function createWatchCompilerHost<T extends BuilderProgram>(configFileName: string, optionsToExtend: CompilerOptions | undefined, system: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): WatchCompilerHostOfConfigFile<T>;
|
5023 | function createWatchCompilerHost<T extends BuilderProgram>(rootFiles: string[], options: CompilerOptions, system: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter, projectReferences?: readonly ProjectReference[], watchOptions?: WatchOptions): WatchCompilerHostOfFilesAndCompilerOptions<T>;
|
5024 | /**
|
5025 | * Creates the watch from the host for root files and compiler options
|
5026 | */
|
5027 | function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfFilesAndCompilerOptions<T>): WatchOfFilesAndCompilerOptions<T>;
|
5028 | /**
|
5029 | * Creates the watch from the host for config file
|
5030 | */
|
5031 | function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfConfigFile<T>): WatchOfConfigFile<T>;
|
5032 | }
|
5033 | declare namespace ts {
|
5034 | interface BuildOptions {
|
5035 | dry?: boolean;
|
5036 | force?: boolean;
|
5037 | verbose?: boolean;
|
5038 | incremental?: boolean;
|
5039 | assumeChangesOnlyAffectDirectDependencies?: boolean;
|
5040 | traceResolution?: boolean;
|
5041 | [option: string]: CompilerOptionsValue | undefined;
|
5042 | }
|
5043 | type ReportEmitErrorSummary = (errorCount: number) => void;
|
5044 | interface SolutionBuilderHostBase<T extends BuilderProgram> extends ProgramHost<T> {
|
5045 | createDirectory?(path: string): void;
|
5046 | |
5047 |
|
5048 |
|
5049 |
|
5050 | writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void;
|
5051 | getModifiedTime(fileName: string): Date | undefined;
|
5052 | setModifiedTime(fileName: string, date: Date): void;
|
5053 | deleteFile(fileName: string): void;
|
5054 | getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
|
5055 | reportDiagnostic: DiagnosticReporter;
|
5056 | reportSolutionBuilderStatus: DiagnosticReporter;
|
5057 | afterProgramEmitAndDiagnostics?(program: T): void;
|
5058 | }
|
5059 | interface SolutionBuilderHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T> {
|
5060 | reportErrorSummary?: ReportEmitErrorSummary;
|
5061 | }
|
5062 | interface SolutionBuilderWithWatchHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T>, WatchHost {
|
5063 | }
|
5064 | interface SolutionBuilder<T extends BuilderProgram> {
|
5065 | build(project?: string, cancellationToken?: CancellationToken): ExitStatus;
|
5066 | clean(project?: string): ExitStatus;
|
5067 | buildReferences(project: string, cancellationToken?: CancellationToken): ExitStatus;
|
5068 | cleanReferences(project?: string): ExitStatus;
|
5069 | getNextInvalidatedProject(cancellationToken?: CancellationToken): InvalidatedProject<T> | undefined;
|
5070 | }
|
5071 | |
5072 |
|
5073 |
|
5074 | function createBuilderStatusReporter(system: System, pretty?: boolean): DiagnosticReporter;
|
5075 | function createSolutionBuilderHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportErrorSummary?: ReportEmitErrorSummary): SolutionBuilderHost<T>;
|
5076 | function createSolutionBuilderWithWatchHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter): SolutionBuilderWithWatchHost<T>;
|
5077 | function createSolutionBuilder<T extends BuilderProgram>(host: SolutionBuilderHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions): SolutionBuilder<T>;
|
5078 | function createSolutionBuilderWithWatch<T extends BuilderProgram>(host: SolutionBuilderWithWatchHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions, baseWatchOptions?: WatchOptions): SolutionBuilder<T>;
|
5079 | enum InvalidatedProjectKind {
|
5080 | Build = 0,
|
5081 | UpdateBundle = 1,
|
5082 | UpdateOutputFileStamps = 2
|
5083 | }
|
5084 | interface InvalidatedProjectBase {
|
5085 | readonly kind: InvalidatedProjectKind;
|
5086 | readonly project: ResolvedConfigFileName;
|
5087 | |
5088 |
|
5089 |
|
5090 | done(cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): ExitStatus;
|
5091 | getCompilerOptions(): CompilerOptions;
|
5092 | getCurrentDirectory(): string;
|
5093 | }
|
5094 | interface UpdateOutputFileStampsProject extends InvalidatedProjectBase {
|
5095 | readonly kind: InvalidatedProjectKind.UpdateOutputFileStamps;
|
5096 | updateOutputFileStatmps(): void;
|
5097 | }
|
5098 | interface BuildInvalidedProject<T extends BuilderProgram> extends InvalidatedProjectBase {
|
5099 | readonly kind: InvalidatedProjectKind.Build;
|
5100 | getBuilderProgram(): T | undefined;
|
5101 | getProgram(): Program | undefined;
|
5102 | getSourceFile(fileName: string): SourceFile | undefined;
|
5103 | getSourceFiles(): readonly SourceFile[];
|
5104 | getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
|
5105 | getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
|
5106 | getConfigFileParsingDiagnostics(): readonly Diagnostic[];
|
5107 | getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
|
5108 | getAllDependencies(sourceFile: SourceFile): readonly string[];
|
5109 | getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
|
5110 | getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>;
|
5111 | emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult | undefined;
|
5112 | }
|
5113 | interface UpdateBundleProject<T extends BuilderProgram> extends InvalidatedProjectBase {
|
5114 | readonly kind: InvalidatedProjectKind.UpdateBundle;
|
5115 | emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject<T> | undefined;
|
5116 | }
|
5117 | type InvalidatedProject<T extends BuilderProgram> = UpdateOutputFileStampsProject | BuildInvalidedProject<T> | UpdateBundleProject<T>;
|
5118 | }
|
5119 | declare namespace ts.server {
|
5120 | type ActionSet = "action::set";
|
5121 | type ActionInvalidate = "action::invalidate";
|
5122 | type ActionPackageInstalled = "action::packageInstalled";
|
5123 | type EventTypesRegistry = "event::typesRegistry";
|
5124 | type EventBeginInstallTypes = "event::beginInstallTypes";
|
5125 | type EventEndInstallTypes = "event::endInstallTypes";
|
5126 | type EventInitializationFailed = "event::initializationFailed";
|
5127 | }
|
5128 | declare namespace ts.server {
|
5129 | interface TypingInstallerResponse {
|
5130 | readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed;
|
5131 | }
|
5132 | interface TypingInstallerRequestWithProjectName {
|
5133 | readonly projectName: string;
|
5134 | }
|
5135 | interface DiscoverTypings extends TypingInstallerRequestWithProjectName {
|
5136 | readonly fileNames: string[];
|
5137 | readonly projectRootPath: Path;
|
5138 | readonly compilerOptions: CompilerOptions;
|
5139 | readonly watchOptions?: WatchOptions;
|
5140 | readonly typeAcquisition: TypeAcquisition;
|
5141 | readonly unresolvedImports: SortedReadonlyArray<string>;
|
5142 | readonly cachePath?: string;
|
5143 | readonly kind: "discover";
|
5144 | }
|
5145 | interface CloseProject extends TypingInstallerRequestWithProjectName {
|
5146 | readonly kind: "closeProject";
|
5147 | }
|
5148 | interface TypesRegistryRequest {
|
5149 | readonly kind: "typesRegistry";
|
5150 | }
|
5151 | interface InstallPackageRequest extends TypingInstallerRequestWithProjectName {
|
5152 | readonly kind: "installPackage";
|
5153 | readonly fileName: Path;
|
5154 | readonly packageName: string;
|
5155 | readonly projectRootPath: Path;
|
5156 | }
|
5157 | interface PackageInstalledResponse extends ProjectResponse {
|
5158 | readonly kind: ActionPackageInstalled;
|
5159 | readonly success: boolean;
|
5160 | readonly message: string;
|
5161 | }
|
5162 | interface InitializationFailedResponse extends TypingInstallerResponse {
|
5163 | readonly kind: EventInitializationFailed;
|
5164 | readonly message: string;
|
5165 | readonly stack?: string;
|
5166 | }
|
5167 | interface ProjectResponse extends TypingInstallerResponse {
|
5168 | readonly projectName: string;
|
5169 | }
|
5170 | interface InvalidateCachedTypings extends ProjectResponse {
|
5171 | readonly kind: ActionInvalidate;
|
5172 | }
|
5173 | interface InstallTypes extends ProjectResponse {
|
5174 | readonly kind: EventBeginInstallTypes | EventEndInstallTypes;
|
5175 | readonly eventId: number;
|
5176 | readonly typingsInstallerVersion: string;
|
5177 | readonly packagesToInstall: readonly string[];
|
5178 | }
|
5179 | interface BeginInstallTypes extends InstallTypes {
|
5180 | readonly kind: EventBeginInstallTypes;
|
5181 | }
|
5182 | interface EndInstallTypes extends InstallTypes {
|
5183 | readonly kind: EventEndInstallTypes;
|
5184 | readonly installSuccess: boolean;
|
5185 | }
|
5186 | interface SetTypings extends ProjectResponse {
|
5187 | readonly typeAcquisition: TypeAcquisition;
|
5188 | readonly compilerOptions: CompilerOptions;
|
5189 | readonly typings: string[];
|
5190 | readonly unresolvedImports: SortedReadonlyArray<string>;
|
5191 | readonly kind: ActionSet;
|
5192 | }
|
5193 | }
|
5194 | declare namespace ts {
|
5195 | interface Node {
|
5196 | getSourceFile(): SourceFile;
|
5197 | getChildCount(sourceFile?: SourceFile): number;
|
5198 | getChildAt(index: number, sourceFile?: SourceFile): Node;
|
5199 | getChildren(sourceFile?: SourceFile): Node[];
|
5200 | getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number;
|
5201 | getFullStart(): number;
|
5202 | getEnd(): number;
|
5203 | getWidth(sourceFile?: SourceFileLike): number;
|
5204 | getFullWidth(): number;
|
5205 | getLeadingTriviaWidth(sourceFile?: SourceFile): number;
|
5206 | getFullText(sourceFile?: SourceFile): string;
|
5207 | getText(sourceFile?: SourceFile): string;
|
5208 | getFirstToken(sourceFile?: SourceFile): Node | undefined;
|
5209 | getLastToken(sourceFile?: SourceFile): Node | undefined;
|
5210 | forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
|
5211 | }
|
5212 | interface Identifier {
|
5213 | readonly text: string;
|
5214 | }
|
5215 | interface PrivateIdentifier {
|
5216 | readonly text: string;
|
5217 | }
|
5218 | interface Symbol {
|
5219 | readonly name: string;
|
5220 | getFlags(): SymbolFlags;
|
5221 | getEscapedName(): __String;
|
5222 | getName(): string;
|
5223 | getDeclarations(): Declaration[] | undefined;
|
5224 | getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
|
5225 | getJsDocTags(): JSDocTagInfo[];
|
5226 | }
|
5227 | interface Type {
|
5228 | getFlags(): TypeFlags;
|
5229 | getSymbol(): Symbol | undefined;
|
5230 | getProperties(): Symbol[];
|
5231 | getProperty(propertyName: string): Symbol | undefined;
|
5232 | getApparentProperties(): Symbol[];
|
5233 | getCallSignatures(): readonly Signature[];
|
5234 | getConstructSignatures(): readonly Signature[];
|
5235 | getStringIndexType(): Type | undefined;
|
5236 | getNumberIndexType(): Type | undefined;
|
5237 | getBaseTypes(): BaseType[] | undefined;
|
5238 | getNonNullableType(): Type;
|
5239 | getConstraint(): Type | undefined;
|
5240 | getDefault(): Type | undefined;
|
5241 | isUnion(): this is UnionType;
|
5242 | isIntersection(): this is IntersectionType;
|
5243 | isUnionOrIntersection(): this is UnionOrIntersectionType;
|
5244 | isLiteral(): this is LiteralType;
|
5245 | isStringLiteral(): this is StringLiteralType;
|
5246 | isNumberLiteral(): this is NumberLiteralType;
|
5247 | isTypeParameter(): this is TypeParameter;
|
5248 | isClassOrInterface(): this is InterfaceType;
|
5249 | isClass(): this is InterfaceType;
|
5250 | }
|
5251 | interface TypeReference {
|
5252 | typeArguments?: readonly Type[];
|
5253 | }
|
5254 | interface Signature {
|
5255 | getDeclaration(): SignatureDeclaration;
|
5256 | getTypeParameters(): TypeParameter[] | undefined;
|
5257 | getParameters(): Symbol[];
|
5258 | getReturnType(): Type;
|
5259 | getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
|
5260 | getJsDocTags(): JSDocTagInfo[];
|
5261 | }
|
5262 | interface SourceFile {
|
5263 | getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
|
5264 | getLineEndOfPosition(pos: number): number;
|
5265 | getLineStarts(): readonly number[];
|
5266 | getPositionOfLineAndCharacter(line: number, character: number): number;
|
5267 | update(newText: string, textChangeRange: TextChangeRange): SourceFile;
|
5268 | }
|
5269 | interface SourceFileLike {
|
5270 | getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
|
5271 | }
|
5272 | interface SourceMapSource {
|
5273 | getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
|
5274 | }
|
5275 | /**
|
5276 | * Represents an immutable snapshot of a script at a specified time.Once acquired, the
|
5277 | * snapshot is observably immutable. i.e. the same calls with the same parameters will return
|
5278 | * the same values.
|
5279 | */
|
5280 | interface IScriptSnapshot {
|
5281 | /** Gets a portion of the script snapshot specified by [start, end). */
|
5282 | getText(start: number, end: number): string;
|
5283 | /** Gets the length of this script snapshot. */
|
5284 | getLength(): number;
|
5285 | /**
|
5286 | * Gets the TextChangeRange that describe how the text changed between this text and
|
5287 | * an older version. This information is used by the incremental parser to determine
|
5288 | * what sections of the script need to be re-parsed. 'undefined' can be returned if the
|
5289 | * change range cannot be determined. However, in that case, incremental parsing will
|
5290 | * not happen and the entire document will be re - parsed.
|
5291 | */
|
5292 | getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange | undefined;
|
5293 | /** Releases all resources held by this script snapshot */
|
5294 | dispose?(): void;
|
5295 | }
|
5296 | namespace ScriptSnapshot {
|
5297 | function fromString(text: string): IScriptSnapshot;
|
5298 | }
|
5299 | interface PreProcessedFileInfo {
|
5300 | referencedFiles: FileReference[];
|
5301 | typeReferenceDirectives: FileReference[];
|
5302 | libReferenceDirectives: FileReference[];
|
5303 | importedFiles: FileReference[];
|
5304 | ambientExternalModules?: string[];
|
5305 | isLibFile: boolean;
|
5306 | }
|
5307 | interface HostCancellationToken {
|
5308 | isCancellationRequested(): boolean;
|
5309 | }
|
5310 | interface InstallPackageOptions {
|
5311 | fileName: Path;
|
5312 | packageName: string;
|
5313 | }
|
5314 | interface PerformanceEvent {
|
5315 | kind: "UpdateGraph" | "CreatePackageJsonAutoImportProvider";
|
5316 | durationMs: number;
|
5317 | }
|
5318 | enum LanguageServiceMode {
|
5319 | Semantic = 0,
|
5320 | PartialSemantic = 1,
|
5321 | Syntactic = 2
|
5322 | }
|
5323 | interface LanguageServiceHost extends GetEffectiveTypeRootsHost {
|
5324 | getCompilationSettings(): CompilerOptions;
|
5325 | getNewLine?(): string;
|
5326 | getProjectVersion?(): string;
|
5327 | getScriptFileNames(): string[];
|
5328 | getScriptKind?(fileName: string): ScriptKind;
|
5329 | getScriptVersion(fileName: string): string;
|
5330 | getScriptSnapshot(fileName: string): IScriptSnapshot | undefined;
|
5331 | getProjectReferences?(): readonly ProjectReference[] | undefined;
|
5332 | getLocalizedDiagnosticMessages?(): any;
|
5333 | getCancellationToken?(): HostCancellationToken;
|
5334 | getCurrentDirectory(): string;
|
5335 | getDefaultLibFileName(options: CompilerOptions): string;
|
5336 | log?(s: string): void;
|
5337 | trace?(s: string): void;
|
5338 | error?(s: string): void;
|
5339 | useCaseSensitiveFileNames?(): boolean;
|
5340 | readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
|
5341 | readFile?(path: string, encoding?: string): string | undefined;
|
5342 | realpath?(path: string): string;
|
5343 | fileExists?(path: string): boolean;
|
5344 | getTypeRootsVersion?(): number;
|
5345 | resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedModule | undefined)[];
|
5346 | getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string): ResolvedModuleWithFailedLookupLocations | undefined;
|
5347 | resolveTypeReferenceDirectives?(typeDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
|
5348 | getDirectories?(directoryName: string): string[];
|
5349 | /**
|
5350 | * Gets a set of custom transformers to use during emit.
|
5351 | */
|
5352 | getCustomTransformers?(): CustomTransformers | undefined;
|
5353 | isKnownTypesPackageName?(name: string): boolean;
|
5354 | installPackage?(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>;
|
5355 | writeFile?(fileName: string, content: string): void;
|
5356 | }
|
5357 | type WithMetadata<T> = T & {
|
5358 | metadata?: unknown;
|
5359 | };
|
5360 | interface LanguageService {
|
5361 | /** This is used as a part of restarting the language service. */
|
5362 | cleanupSemanticCache(): void;
|
5363 | /**
|
5364 | * Gets errors indicating invalid syntax in a file.
|
5365 | *
|
5366 | * In English, "this cdeo have, erorrs" is syntactically invalid because it has typos,
|
5367 | * grammatical errors, and misplaced punctuation. Likewise, examples of syntax
|
5368 | * errors in TypeScript are missing parentheses in an `if` statement, mismatched
|
5369 | * curly braces, and using a reserved keyword as a variable name.
|
5370 | *
|
5371 | * These diagnostics are inexpensive to compute and don't require knowledge of
|
5372 | * other files. Note that a non-empty result increases the likelihood of false positives
|
5373 | * from `getSemanticDiagnostics`.
|
5374 | *
|
5375 | * While these represent the majority of syntax-related diagnostics, there are some
|
5376 | * that require the type system, which will be present in `getSemanticDiagnostics`.
|
5377 | *
|
5378 | * @param fileName A path to the file you want syntactic diagnostics for
|
5379 | */
|
5380 | getSyntacticDiagnostics(fileName: string): DiagnosticWithLocation[];
|
5381 | /**
|
5382 | * Gets warnings or errors indicating type system issues in a given file.
|
5383 | * Requesting semantic diagnostics may start up the type system and
|
5384 | * run deferred work, so the first call may take longer than subsequent calls.
|
5385 | *
|
5386 | * Unlike the other get*Diagnostics functions, these diagnostics can potentially not
|
5387 | * include a reference to a source file. Specifically, the first time this is called,
|
5388 | * it will return global diagnostics with no associated location.
|
5389 | *
|
5390 | * To contrast the differences between semantic and syntactic diagnostics, consider the
|
5391 | * sentence: "The sun is green." is syntactically correct; those are real English words with
|
5392 | * correct sentence structure. However, it is semantically invalid, because it is not true.
|
5393 | *
|
5394 | * @param fileName A path to the file you want semantic diagnostics for
|
5395 | */
|
5396 | getSemanticDiagnostics(fileName: string): Diagnostic[];
|
5397 | /**
|
5398 | * Gets suggestion diagnostics for a specific file. These diagnostics tend to
|
5399 | * proactively suggest refactors, as opposed to diagnostics that indicate
|
5400 | * potentially incorrect runtime behavior.
|
5401 | *
|
5402 | * @param fileName A path to the file you want semantic diagnostics for
|
5403 | */
|
5404 | getSuggestionDiagnostics(fileName: string): DiagnosticWithLocation[];
|
5405 | /**
|
5406 | * Gets global diagnostics related to the program configuration and compiler options.
|
5407 | */
|
5408 | getCompilerOptionsDiagnostics(): Diagnostic[];
|
5409 | /** @deprecated Use getEncodedSyntacticClassifications instead. */
|
5410 | getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
|
5411 | /** @deprecated Use getEncodedSemanticClassifications instead. */
|
5412 | getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
|
5413 | getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications;
|
5414 | getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications;
|
5415 | /**
|
5416 | * Gets completion entries at a particular position in a file.
|
5417 | *
|
5418 | * @param fileName The path to the file
|
5419 | * @param position A zero-based index of the character where you want the entries
|
5420 | * @param options An object describing how the request was triggered and what kinds
|
5421 | * of code actions can be returned with the completions.
|
5422 | */
|
5423 | getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined): WithMetadata<CompletionInfo> | undefined;
|
5424 | /**
|
5425 | * Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`.
|
5426 | *
|
5427 | * @param fileName The path to the file
|
5428 | * @param position A zero based index of the character where you want the entries
|
5429 | * @param entryName The name from an existing completion which came from `getCompletionsAtPosition`
|
5430 | * @param formatOptions How should code samples in the completions be formatted, can be undefined for backwards compatibility
|
5431 | * @param source Source code for the current file, can be undefined for backwards compatibility
|
5432 | * @param preferences User settings, can be undefined for backwards compatibility
|
5433 | */
|
5434 | getCompletionEntryDetails(fileName: string, position: number, entryName: string, formatOptions: FormatCodeOptions | FormatCodeSettings | undefined, source: string | undefined, preferences: UserPreferences | undefined): CompletionEntryDetails | undefined;
|
5435 | getCompletionEntrySymbol(fileName: string, position: number, name: string, source: string | undefined): Symbol | undefined;
|
5436 | /**
|
5437 | * Gets semantic information about the identifier at a particular position in a
|
5438 | * file. Quick info is what you typically see when you hover in an editor.
|
5439 | *
|
5440 | * @param fileName The path to the file
|
5441 | * @param position A zero-based index of the character where you want the quick info
|
5442 | */
|
5443 | getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined;
|
5444 | getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined;
|
5445 | getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan | undefined;
|
5446 | getSignatureHelpItems(fileName: string, position: number, options: SignatureHelpItemsOptions | undefined): SignatureHelpItems | undefined;
|
5447 | getRenameInfo(fileName: string, position: number, options?: RenameInfoOptions): RenameInfo;
|
5448 | findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): readonly RenameLocation[] | undefined;
|
5449 | getSmartSelectionRange(fileName: string, position: number): SelectionRange;
|
5450 | getDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined;
|
5451 | getDefinitionAndBoundSpan(fileName: string, position: number): DefinitionInfoAndBoundSpan | undefined;
|
5452 | getTypeDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined;
|
5453 | getImplementationAtPosition(fileName: string, position: number): readonly ImplementationLocation[] | undefined;
|
5454 | getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[] | undefined;
|
5455 | findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined;
|
5456 | getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined;
|
5457 | /** @deprecated */
|
5458 | getOccurrencesAtPosition(fileName: string, position: number): readonly ReferenceEntry[] | undefined;
|
5459 | getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[];
|
5460 | getNavigationBarItems(fileName: string): NavigationBarItem[];
|
5461 | getNavigationTree(fileName: string): NavigationTree;
|
5462 | prepareCallHierarchy(fileName: string, position: number): CallHierarchyItem | CallHierarchyItem[] | undefined;
|
5463 | provideCallHierarchyIncomingCalls(fileName: string, position: number): CallHierarchyIncomingCall[];
|
5464 | provideCallHierarchyOutgoingCalls(fileName: string, position: number): CallHierarchyOutgoingCall[];
|
5465 | getOutliningSpans(fileName: string): OutliningSpan[];
|
5466 | getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[];
|
5467 | getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[];
|
5468 | getIndentationAtPosition(fileName: string, position: number, options: EditorOptions | EditorSettings): number;
|
5469 | getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
|
5470 | getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
|
5471 | getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
|
5472 | getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion | undefined;
|
5473 | isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
|
5474 | /**
|
5475 | * This will return a defined result if the position is after the `>` of the opening tag, or somewhere in the text, of a JSXElement with no closing tag.
|
5476 | * Editors should call this after `>` is typed.
|
5477 | */
|
5478 | getJsxClosingTagAtPosition(fileName: string, position: number): JsxClosingTagInfo | undefined;
|
5479 | getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): TextSpan | undefined;
|
5480 | toLineColumnOffset?(fileName: string, position: number): LineAndCharacter;
|
5481 | getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[];
|
5482 | getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings, preferences: UserPreferences): CombinedCodeActions;
|
5483 | applyCodeActionCommand(action: CodeActionCommand, formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult>;
|
5484 | applyCodeActionCommand(action: CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult[]>;
|
5485 | applyCodeActionCommand(action: CodeActionCommand | CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
|
5486 | /** @deprecated `fileName` will be ignored */
|
5487 | applyCodeActionCommand(fileName: string, action: CodeActionCommand): Promise<ApplyCodeActionCommandResult>;
|
5488 | /** @deprecated `fileName` will be ignored */
|
5489 | applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise<ApplyCodeActionCommandResult[]>;
|
5490 | /** @deprecated `fileName` will be ignored */
|
5491 | applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
|
5492 | getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason): ApplicableRefactorInfo[];
|
5493 | getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined;
|
5494 | organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
|
5495 | getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
|
5496 | getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput;
|
5497 | getProgram(): Program | undefined;
|
5498 | toggleLineComment(fileName: string, textRange: TextRange): TextChange[];
|
5499 | toggleMultilineComment(fileName: string, textRange: TextRange): TextChange[];
|
5500 | commentSelection(fileName: string, textRange: TextRange): TextChange[];
|
5501 | uncommentSelection(fileName: string, textRange: TextRange): TextChange[];
|
5502 | dispose(): void;
|
5503 | }
|
5504 | interface JsxClosingTagInfo {
|
5505 | readonly newText: string;
|
5506 | }
|
5507 | interface CombinedCodeFixScope {
|
5508 | type: "file";
|
5509 | fileName: string;
|
5510 | }
|
5511 | type OrganizeImportsScope = CombinedCodeFixScope;
|
5512 | type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#";
|
5513 | interface GetCompletionsAtPositionOptions extends UserPreferences {
|
5514 | /**
|
5515 | * If the editor is asking for completions because a certain character was typed
|
5516 | * (as opposed to when the user explicitly requested them) this should be set.
|
5517 | */
|
5518 | triggerCharacter?: CompletionsTriggerCharacter;
|
5519 | /** @deprecated Use includeCompletionsForModuleExports */
|
5520 | includeExternalModuleExports?: boolean;
|
5521 | /** @deprecated Use includeCompletionsWithInsertText */
|
5522 | includeInsertTextCompletions?: boolean;
|
5523 | }
|
5524 | type SignatureHelpTriggerCharacter = "," | "(" | "<";
|
5525 | type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
|
5526 | interface SignatureHelpItemsOptions {
|
5527 | triggerReason?: SignatureHelpTriggerReason;
|
5528 | }
|
5529 | type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason;
|
5530 | /**
|
5531 | * Signals that the user manually requested signature help.
|
5532 | * The language service will unconditionally attempt to provide a result.
|
5533 | */
|
5534 | interface SignatureHelpInvokedReason {
|
5535 | kind: "invoked";
|
5536 | triggerCharacter?: undefined;
|
5537 | }
|
5538 | /**
|
5539 | * Signals that the signature help request came from a user typing a character.
|
5540 | * Depending on the character and the syntactic context, the request may or may not be served a result.
|
5541 | */
|
5542 | interface SignatureHelpCharacterTypedReason {
|
5543 | kind: "characterTyped";
|
5544 | /**
|
5545 | * Character that was responsible for triggering signature help.
|
5546 | */
|
5547 | triggerCharacter: SignatureHelpTriggerCharacter;
|
5548 | }
|
5549 | /**
|
5550 | * Signals that this signature help request came from typing a character or moving the cursor.
|
5551 | * This should only occur if a signature help session was already active and the editor needs to see if it should adjust.
|
5552 | * The language service will unconditionally attempt to provide a result.
|
5553 | * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move.
|
5554 | */
|
5555 | interface SignatureHelpRetriggeredReason {
|
5556 | kind: "retrigger";
|
5557 | /**
|
5558 | * Character that was responsible for triggering signature help.
|
5559 | */
|
5560 | triggerCharacter?: SignatureHelpRetriggerCharacter;
|
5561 | }
|
5562 | interface ApplyCodeActionCommandResult {
|
5563 | successMessage: string;
|
5564 | }
|
5565 | interface Classifications {
|
5566 | spans: number[];
|
5567 | endOfLineState: EndOfLineState;
|
5568 | }
|
5569 | interface ClassifiedSpan {
|
5570 | textSpan: TextSpan;
|
5571 | classificationType: ClassificationTypeNames;
|
5572 | }
|
5573 | /**
|
5574 | * Navigation bar interface designed for visual studio's dual-column layout.
|
5575 | * This does not form a proper tree.
|
5576 | * The navbar is returned as a list of top-level items, each of which has a list of child items.
|
5577 | * Child items always have an empty array for their `childItems`.
|
5578 | */
|
5579 | interface NavigationBarItem {
|
5580 | text: string;
|
5581 | kind: ScriptElementKind;
|
5582 | kindModifiers: string;
|
5583 | spans: TextSpan[];
|
5584 | childItems: NavigationBarItem[];
|
5585 | indent: number;
|
5586 | bolded: boolean;
|
5587 | grayed: boolean;
|
5588 | }
|
5589 | /**
|
5590 | * Node in a tree of nested declarations in a file.
|
5591 | * The top node is always a script or module node.
|
5592 | */
|
5593 | interface NavigationTree {
|
5594 | /** Name of the declaration, or a short description, e.g. "<class>". */
|
5595 | text: string;
|
5596 | kind: ScriptElementKind;
|
5597 | /** ScriptElementKindModifier separated by commas, e.g. "public,abstract" */
|
5598 | kindModifiers: string;
|
5599 | /**
|
5600 | * Spans of the nodes that generated this declaration.
|
5601 | * There will be more than one if this is the result of merging.
|
5602 | */
|
5603 | spans: TextSpan[];
|
5604 | nameSpan: TextSpan | undefined;
|
5605 | /** Present if non-empty */
|
5606 | childItems?: NavigationTree[];
|
5607 | }
|
5608 | interface CallHierarchyItem {
|
5609 | name: string;
|
5610 | kind: ScriptElementKind;
|
5611 | kindModifiers?: string;
|
5612 | file: string;
|
5613 | span: TextSpan;
|
5614 | selectionSpan: TextSpan;
|
5615 | containerName?: string;
|
5616 | }
|
5617 | interface CallHierarchyIncomingCall {
|
5618 | from: CallHierarchyItem;
|
5619 | fromSpans: TextSpan[];
|
5620 | }
|
5621 | interface CallHierarchyOutgoingCall {
|
5622 | to: CallHierarchyItem;
|
5623 | fromSpans: TextSpan[];
|
5624 | }
|
5625 | interface TodoCommentDescriptor {
|
5626 | text: string;
|
5627 | priority: number;
|
5628 | }
|
5629 | interface TodoComment {
|
5630 | descriptor: TodoCommentDescriptor;
|
5631 | message: string;
|
5632 | position: number;
|
5633 | }
|
5634 | interface TextChange {
|
5635 | span: TextSpan;
|
5636 | newText: string;
|
5637 | }
|
5638 | interface FileTextChanges {
|
5639 | fileName: string;
|
5640 | textChanges: readonly TextChange[];
|
5641 | isNewFile?: boolean;
|
5642 | }
|
5643 | interface CodeAction {
|
5644 | /** Description of the code action to display in the UI of the editor */
|
5645 | description: string;
|
5646 | /** Text changes to apply to each file as part of the code action */
|
5647 | changes: FileTextChanges[];
|
5648 | /**
|
5649 | * If the user accepts the code fix, the editor should send the action back in a `applyAction` request.
|
5650 | * This allows the language service to have side effects (e.g. installing dependencies) upon a code fix.
|
5651 | */
|
5652 | commands?: CodeActionCommand[];
|
5653 | }
|
5654 | interface CodeFixAction extends CodeAction {
|
5655 | /** Short name to identify the fix, for use by telemetry. */
|
5656 | fixName: string;
|
5657 | /**
|
5658 | * If present, one may call 'getCombinedCodeFix' with this fixId.
|
5659 | * This may be omitted to indicate that the code fix can't be applied in a group.
|
5660 | */
|
5661 | fixId?: {};
|
5662 | fixAllDescription?: string;
|
5663 | }
|
5664 | interface CombinedCodeActions {
|
5665 | changes: readonly FileTextChanges[];
|
5666 | commands?: readonly CodeActionCommand[];
|
5667 | }
|
5668 | type CodeActionCommand = InstallPackageAction;
|
5669 | interface InstallPackageAction {
|
5670 | }
|
5671 | /**
|
5672 | * A set of one or more available refactoring actions, grouped under a parent refactoring.
|
5673 | */
|
5674 | interface ApplicableRefactorInfo {
|
5675 | /**
|
5676 | * The programmatic name of the refactoring
|
5677 | */
|
5678 | name: string;
|
5679 | /**
|
5680 | * A description of this refactoring category to show to the user.
|
5681 | * If the refactoring gets inlined (see below), this text will not be visible.
|
5682 | */
|
5683 | description: string;
|
5684 | /**
|
5685 | * Inlineable refactorings can have their actions hoisted out to the top level
|
5686 | * of a context menu. Non-inlineanable refactorings should always be shown inside
|
5687 | * their parent grouping.
|
5688 | *
|
5689 | * If not specified, this value is assumed to be 'true'
|
5690 | */
|
5691 | inlineable?: boolean;
|
5692 | actions: RefactorActionInfo[];
|
5693 | }
|
5694 | /**
|
5695 | * Represents a single refactoring action - for example, the "Extract Method..." refactor might
|
5696 | * offer several actions, each corresponding to a surround class or closure to extract into.
|
5697 | */
|
5698 | interface RefactorActionInfo {
|
5699 | /**
|
5700 | * The programmatic name of the refactoring action
|
5701 | */
|
5702 | name: string;
|
5703 | /**
|
5704 | * A description of this refactoring action to show to the user.
|
5705 | * If the parent refactoring is inlined away, this will be the only text shown,
|
5706 | * so this description should make sense by itself if the parent is inlineable=true
|
5707 | */
|
5708 | description: string;
|
5709 | /**
|
5710 | * A message to show to the user if the refactoring cannot be applied in
|
5711 | * the current context.
|
5712 | */
|
5713 | notApplicableReason?: string;
|
5714 | }
|
5715 | /**
|
5716 | * A set of edits to make in response to a refactor action, plus an optional
|
5717 | * location where renaming should be invoked from
|
5718 | */
|
5719 | interface RefactorEditInfo {
|
5720 | edits: FileTextChanges[];
|
5721 | renameFilename?: string;
|
5722 | renameLocation?: number;
|
5723 | commands?: CodeActionCommand[];
|
5724 | }
|
5725 | type RefactorTriggerReason = "implicit" | "invoked";
|
5726 | interface TextInsertion {
|
5727 | newText: string;
|
5728 | /** The position in newText the caret should point to after the insertion. */
|
5729 | caretOffset: number;
|
5730 | }
|
5731 | interface DocumentSpan {
|
5732 | textSpan: TextSpan;
|
5733 | fileName: string;
|
5734 | /**
|
5735 | * If the span represents a location that was remapped (e.g. via a .d.ts.map file),
|
5736 | * then the original filename and span will be specified here
|
5737 | */
|
5738 | originalTextSpan?: TextSpan;
|
5739 | originalFileName?: string;
|
5740 | /**
|
5741 | * If DocumentSpan.textSpan is the span for name of the declaration,
|
5742 | * then this is the span for relevant declaration
|
5743 | */
|
5744 | contextSpan?: TextSpan;
|
5745 | originalContextSpan?: TextSpan;
|
5746 | }
|
5747 | interface RenameLocation extends DocumentSpan {
|
5748 | readonly prefixText?: string;
|
5749 | readonly suffixText?: string;
|
5750 | }
|
5751 | interface ReferenceEntry extends DocumentSpan {
|
5752 | isWriteAccess: boolean;
|
5753 | isDefinition: boolean;
|
5754 | isInString?: true;
|
5755 | }
|
5756 | interface ImplementationLocation extends DocumentSpan {
|
5757 | kind: ScriptElementKind;
|
5758 | displayParts: SymbolDisplayPart[];
|
5759 | }
|
5760 | enum HighlightSpanKind {
|
5761 | none = "none",
|
5762 | definition = "definition",
|
5763 | reference = "reference",
|
5764 | writtenReference = "writtenReference"
|
5765 | }
|
5766 | interface HighlightSpan {
|
5767 | fileName?: string;
|
5768 | isInString?: true;
|
5769 | textSpan: TextSpan;
|
5770 | contextSpan?: TextSpan;
|
5771 | kind: HighlightSpanKind;
|
5772 | }
|
5773 | interface NavigateToItem {
|
5774 | name: string;
|
5775 | kind: ScriptElementKind;
|
5776 | kindModifiers: string;
|
5777 | matchKind: "exact" | "prefix" | "substring" | "camelCase";
|
5778 | isCaseSensitive: boolean;
|
5779 | fileName: string;
|
5780 | textSpan: TextSpan;
|
5781 | containerName: string;
|
5782 | containerKind: ScriptElementKind;
|
5783 | }
|
5784 | enum IndentStyle {
|
5785 | None = 0,
|
5786 | Block = 1,
|
5787 | Smart = 2
|
5788 | }
|
5789 | enum SemicolonPreference {
|
5790 | Ignore = "ignore",
|
5791 | Insert = "insert",
|
5792 | Remove = "remove"
|
5793 | }
|
5794 | interface EditorOptions {
|
5795 | BaseIndentSize?: number;
|
5796 | IndentSize: number;
|
5797 | TabSize: number;
|
5798 | NewLineCharacter: string;
|
5799 | ConvertTabsToSpaces: boolean;
|
5800 | IndentStyle: IndentStyle;
|
5801 | }
|
5802 | interface EditorSettings {
|
5803 | baseIndentSize?: number;
|
5804 | indentSize?: number;
|
5805 | tabSize?: number;
|
5806 | newLineCharacter?: string;
|
5807 | convertTabsToSpaces?: boolean;
|
5808 | indentStyle?: IndentStyle;
|
5809 | trimTrailingWhitespace?: boolean;
|
5810 | }
|
5811 | interface FormatCodeOptions extends EditorOptions {
|
5812 | InsertSpaceAfterCommaDelimiter: boolean;
|
5813 | InsertSpaceAfterSemicolonInForStatements: boolean;
|
5814 | InsertSpaceBeforeAndAfterBinaryOperators: boolean;
|
5815 | InsertSpaceAfterConstructor?: boolean;
|
5816 | InsertSpaceAfterKeywordsInControlFlowStatements: boolean;
|
5817 | InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
|
5818 | InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
|
5819 | InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
|
5820 | InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
|
5821 | InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
|
5822 | InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
|
5823 | InsertSpaceAfterTypeAssertion?: boolean;
|
5824 | InsertSpaceBeforeFunctionParenthesis?: boolean;
|
5825 | PlaceOpenBraceOnNewLineForFunctions: boolean;
|
5826 | PlaceOpenBraceOnNewLineForControlBlocks: boolean;
|
5827 | insertSpaceBeforeTypeAnnotation?: boolean;
|
5828 | }
|
5829 | interface FormatCodeSettings extends EditorSettings {
|
5830 | readonly insertSpaceAfterCommaDelimiter?: boolean;
|
5831 | readonly insertSpaceAfterSemicolonInForStatements?: boolean;
|
5832 | readonly insertSpaceBeforeAndAfterBinaryOperators?: boolean;
|
5833 | readonly insertSpaceAfterConstructor?: boolean;
|
5834 | readonly insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
|
5835 | readonly insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
|
5836 | readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
|
5837 | readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
|
5838 | readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
|
5839 | readonly insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean;
|
5840 | readonly insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
|
5841 | readonly insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
|
5842 | readonly insertSpaceAfterTypeAssertion?: boolean;
|
5843 | readonly insertSpaceBeforeFunctionParenthesis?: boolean;
|
5844 | readonly placeOpenBraceOnNewLineForFunctions?: boolean;
|
5845 | readonly placeOpenBraceOnNewLineForControlBlocks?: boolean;
|
5846 | readonly insertSpaceBeforeTypeAnnotation?: boolean;
|
5847 | readonly indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean;
|
5848 | readonly semicolons?: SemicolonPreference;
|
5849 | }
|
5850 | function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings;
|
5851 | interface DefinitionInfo extends DocumentSpan {
|
5852 | kind: ScriptElementKind;
|
5853 | name: string;
|
5854 | containerKind: ScriptElementKind;
|
5855 | containerName: string;
|
5856 | }
|
5857 | interface DefinitionInfoAndBoundSpan {
|
5858 | definitions?: readonly DefinitionInfo[];
|
5859 | textSpan: TextSpan;
|
5860 | }
|
5861 | interface ReferencedSymbolDefinitionInfo extends DefinitionInfo {
|
5862 | displayParts: SymbolDisplayPart[];
|
5863 | }
|
5864 | interface ReferencedSymbol {
|
5865 | definition: ReferencedSymbolDefinitionInfo;
|
5866 | references: ReferenceEntry[];
|
5867 | }
|
5868 | enum SymbolDisplayPartKind {
|
5869 | aliasName = 0,
|
5870 | className = 1,
|
5871 | enumName = 2,
|
5872 | fieldName = 3,
|
5873 | interfaceName = 4,
|
5874 | keyword = 5,
|
5875 | lineBreak = 6,
|
5876 | numericLiteral = 7,
|
5877 | stringLiteral = 8,
|
5878 | localName = 9,
|
5879 | methodName = 10,
|
5880 | moduleName = 11,
|
5881 | operator = 12,
|
5882 | parameterName = 13,
|
5883 | propertyName = 14,
|
5884 | punctuation = 15,
|
5885 | space = 16,
|
5886 | text = 17,
|
5887 | typeParameterName = 18,
|
5888 | enumMemberName = 19,
|
5889 | functionName = 20,
|
5890 | regularExpressionLiteral = 21
|
5891 | }
|
5892 | interface SymbolDisplayPart {
|
5893 | text: string;
|
5894 | kind: string;
|
5895 | }
|
5896 | interface JSDocTagInfo {
|
5897 | name: string;
|
5898 | text?: string;
|
5899 | }
|
5900 | interface QuickInfo {
|
5901 | kind: ScriptElementKind;
|
5902 | kindModifiers: string;
|
5903 | textSpan: TextSpan;
|
5904 | displayParts?: SymbolDisplayPart[];
|
5905 | documentation?: SymbolDisplayPart[];
|
5906 | tags?: JSDocTagInfo[];
|
5907 | }
|
5908 | type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
|
5909 | interface RenameInfoSuccess {
|
5910 | canRename: true;
|
5911 | /**
|
5912 | * File or directory to rename.
|
5913 | * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`.
|
5914 | */
|
5915 | fileToRename?: string;
|
5916 | displayName: string;
|
5917 | fullDisplayName: string;
|
5918 | kind: ScriptElementKind;
|
5919 | kindModifiers: string;
|
5920 | triggerSpan: TextSpan;
|
5921 | }
|
5922 | interface RenameInfoFailure {
|
5923 | canRename: false;
|
5924 | localizedErrorMessage: string;
|
5925 | }
|
5926 | interface RenameInfoOptions {
|
5927 | readonly allowRenameOfImportPath?: boolean;
|
5928 | }
|
5929 | interface SignatureHelpParameter {
|
5930 | name: string;
|
5931 | documentation: SymbolDisplayPart[];
|
5932 | displayParts: SymbolDisplayPart[];
|
5933 | isOptional: boolean;
|
5934 | }
|
5935 | interface SelectionRange {
|
5936 | textSpan: TextSpan;
|
5937 | parent?: SelectionRange;
|
5938 | }
|
5939 | /**
|
5940 | * Represents a single signature to show in signature help.
|
5941 | * The id is used for subsequent calls into the language service to ask questions about the
|
5942 | * signature help item in the context of any documents that have been updated. i.e. after
|
5943 | * an edit has happened, while signature help is still active, the host can ask important
|
5944 | * questions like 'what parameter is the user currently contained within?'.
|
5945 | */
|
5946 | interface SignatureHelpItem {
|
5947 | isVariadic: boolean;
|
5948 | prefixDisplayParts: SymbolDisplayPart[];
|
5949 | suffixDisplayParts: SymbolDisplayPart[];
|
5950 | separatorDisplayParts: SymbolDisplayPart[];
|
5951 | parameters: SignatureHelpParameter[];
|
5952 | documentation: SymbolDisplayPart[];
|
5953 | tags: JSDocTagInfo[];
|
5954 | }
|
5955 | /**
|
5956 | * Represents a set of signature help items, and the preferred item that should be selected.
|
5957 | */
|
5958 | interface SignatureHelpItems {
|
5959 | items: SignatureHelpItem[];
|
5960 | applicableSpan: TextSpan;
|
5961 | selectedItemIndex: number;
|
5962 | argumentIndex: number;
|
5963 | argumentCount: number;
|
5964 | }
|
5965 | interface CompletionInfo {
|
5966 | /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */
|
5967 | isGlobalCompletion: boolean;
|
5968 | isMemberCompletion: boolean;
|
5969 | /**
|
5970 | * true when the current location also allows for a new identifier
|
5971 | */
|
5972 | isNewIdentifierLocation: boolean;
|
5973 | entries: CompletionEntry[];
|
5974 | }
|
5975 | interface CompletionEntry {
|
5976 | name: string;
|
5977 | kind: ScriptElementKind;
|
5978 | kindModifiers?: string;
|
5979 | sortText: string;
|
5980 | insertText?: string;
|
5981 | /**
|
5982 | * An optional span that indicates the text to be replaced by this completion item.
|
5983 | * If present, this span should be used instead of the default one.
|
5984 | * It will be set if the required span differs from the one generated by the default replacement behavior.
|
5985 | */
|
5986 | replacementSpan?: TextSpan;
|
5987 | hasAction?: true;
|
5988 | source?: string;
|
5989 | isRecommended?: true;
|
5990 | isFromUncheckedFile?: true;
|
5991 | isPackageJsonImport?: true;
|
5992 | }
|
5993 | interface CompletionEntryDetails {
|
5994 | name: string;
|
5995 | kind: ScriptElementKind;
|
5996 | kindModifiers: string;
|
5997 | displayParts: SymbolDisplayPart[];
|
5998 | documentation?: SymbolDisplayPart[];
|
5999 | tags?: JSDocTagInfo[];
|
6000 | codeActions?: CodeAction[];
|
6001 | source?: SymbolDisplayPart[];
|
6002 | }
|
6003 | interface OutliningSpan {
|
6004 | /** The span of the document to actually collapse. */
|
6005 | textSpan: TextSpan;
|
6006 | /** The span of the document to display when the user hovers over the collapsed span. */
|
6007 | hintSpan: TextSpan;
|
6008 | /** The text to display in the editor for the collapsed region. */
|
6009 | bannerText: string;
|
6010 | /**
|
6011 | * Whether or not this region should be automatically collapsed when
|
6012 | * the 'Collapse to Definitions' command is invoked.
|
6013 | */
|
6014 | autoCollapse: boolean;
|
6015 | /**
|
6016 | * Classification of the contents of the span
|
6017 | */
|
6018 | kind: OutliningSpanKind;
|
6019 | }
|
6020 | enum OutliningSpanKind {
|
6021 | /** Single or multi-line comments */
|
6022 | Comment = "comment",
|
6023 | /** Sections marked by '// #region' and '// #endregion' comments */
|
6024 | Region = "region",
|
6025 | /** Declarations and expressions */
|
6026 | Code = "code",
|
6027 | /** Contiguous blocks of import declarations */
|
6028 | Imports = "imports"
|
6029 | }
|
6030 | enum OutputFileType {
|
6031 | JavaScript = 0,
|
6032 | SourceMap = 1,
|
6033 | Declaration = 2
|
6034 | }
|
6035 | enum EndOfLineState {
|
6036 | None = 0,
|
6037 | InMultiLineCommentTrivia = 1,
|
6038 | InSingleQuoteStringLiteral = 2,
|
6039 | InDoubleQuoteStringLiteral = 3,
|
6040 | InTemplateHeadOrNoSubstitutionTemplate = 4,
|
6041 | InTemplateMiddleOrTail = 5,
|
6042 | InTemplateSubstitutionPosition = 6
|
6043 | }
|
6044 | enum TokenClass {
|
6045 | Punctuation = 0,
|
6046 | Keyword = 1,
|
6047 | Operator = 2,
|
6048 | Comment = 3,
|
6049 | Whitespace = 4,
|
6050 | Identifier = 5,
|
6051 | NumberLiteral = 6,
|
6052 | BigIntLiteral = 7,
|
6053 | StringLiteral = 8,
|
6054 | RegExpLiteral = 9
|
6055 | }
|
6056 | interface ClassificationResult {
|
6057 | finalLexState: EndOfLineState;
|
6058 | entries: ClassificationInfo[];
|
6059 | }
|
6060 | interface ClassificationInfo {
|
6061 | length: number;
|
6062 | classification: TokenClass;
|
6063 | }
|
6064 | interface Classifier {
|
6065 | /**
|
6066 | * Gives lexical classifications of tokens on a line without any syntactic context.
|
6067 | * For instance, a token consisting of the text 'string' can be either an identifier
|
6068 | * named 'string' or the keyword 'string', however, because this classifier is not aware,
|
6069 | * it relies on certain heuristics to give acceptable results. For classifications where
|
6070 | * speed trumps accuracy, this function is preferable; however, for true accuracy, the
|
6071 | * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the
|
6072 | * lexical, syntactic, and semantic classifiers may issue the best user experience.
|
6073 | *
|
6074 | * @param text The text of a line to classify.
|
6075 | * @param lexState The state of the lexical classifier at the end of the previous line.
|
6076 | * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier.
|
6077 | * If there is no syntactic classifier (syntacticClassifierAbsent=true),
|
6078 | * certain heuristics may be used in its place; however, if there is a
|
6079 | * syntactic classifier (syntacticClassifierAbsent=false), certain
|
6080 | * classifications which may be incorrectly categorized will be given
|
6081 | * back as Identifiers in order to allow the syntactic classifier to
|
6082 | * subsume the classification.
|
6083 | * @deprecated Use getLexicalClassifications instead.
|
6084 | */
|
6085 | getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult;
|
6086 | getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications;
|
6087 | }
|
6088 | enum ScriptElementKind {
|
6089 | unknown = "",
|
6090 | warning = "warning",
|
6091 | /** predefined type (void) or keyword (class) */
|
6092 | keyword = "keyword",
|
6093 | /** top level script node */
|
6094 | scriptElement = "script",
|
6095 | /** module foo {} */
|
6096 | moduleElement = "module",
|
6097 | /** class X {} */
|
6098 | classElement = "class",
|
6099 | /** var x = class X {} */
|
6100 | localClassElement = "local class",
|
6101 | /** interface Y {} */
|
6102 | interfaceElement = "interface",
|
6103 | /** type T = ... */
|
6104 | typeElement = "type",
|
6105 | /** enum E */
|
6106 | enumElement = "enum",
|
6107 | enumMemberElement = "enum member",
|
6108 | /**
|
6109 | * Inside module and script only
|
6110 | * const v = ..
|
6111 | */
|
6112 | variableElement = "var",
|
6113 | /** Inside function */
|
6114 | localVariableElement = "local var",
|
6115 | /**
|
6116 | * Inside module and script only
|
6117 | * function f() { }
|
6118 | */
|
6119 | functionElement = "function",
|
6120 | /** Inside function */
|
6121 | localFunctionElement = "local function",
|
6122 | /** class X { [public|private]* foo() {} } */
|
6123 | memberFunctionElement = "method",
|
6124 | /** class X { [public|private]* [get|set] foo:number; } */
|
6125 | memberGetAccessorElement = "getter",
|
6126 | memberSetAccessorElement = "setter",
|
6127 | /**
|
6128 | * class X { [public|private]* foo:number; }
|
6129 | * interface Y { foo:number; }
|
6130 | */
|
6131 | memberVariableElement = "property",
|
6132 | /** class X { constructor() { } } */
|
6133 | constructorImplementationElement = "constructor",
|
6134 | /** interface Y { ():number; } */
|
6135 | callSignatureElement = "call",
|
6136 | /** interface Y { []:number; } */
|
6137 | indexSignatureElement = "index",
|
6138 | /** interface Y { new():Y; } */
|
6139 | constructSignatureElement = "construct",
|
6140 | /** function foo(*Y*: string) */
|
6141 | parameterElement = "parameter",
|
6142 | typeParameterElement = "type parameter",
|
6143 | primitiveType = "primitive type",
|
6144 | label = "label",
|
6145 | alias = "alias",
|
6146 | constElement = "const",
|
6147 | letElement = "let",
|
6148 | directory = "directory",
|
6149 | externalModuleName = "external module name",
|
6150 | /**
|
6151 | * <JsxTagName attribute1 attribute2={0} />
|
6152 | */
|
6153 | jsxAttribute = "JSX attribute",
|
6154 | /** String literal */
|
6155 | string = "string"
|
6156 | }
|
6157 | enum ScriptElementKindModifier {
|
6158 | none = "",
|
6159 | publicMemberModifier = "public",
|
6160 | privateMemberModifier = "private",
|
6161 | protectedMemberModifier = "protected",
|
6162 | exportedModifier = "export",
|
6163 | ambientModifier = "declare",
|
6164 | staticModifier = "static",
|
6165 | abstractModifier = "abstract",
|
6166 | optionalModifier = "optional",
|
6167 | deprecatedModifier = "deprecated",
|
6168 | dtsModifier = ".d.ts",
|
6169 | tsModifier = ".ts",
|
6170 | tsxModifier = ".tsx",
|
6171 | jsModifier = ".js",
|
6172 | jsxModifier = ".jsx",
|
6173 | jsonModifier = ".json"
|
6174 | }
|
6175 | enum ClassificationTypeNames {
|
6176 | comment = "comment",
|
6177 | identifier = "identifier",
|
6178 | keyword = "keyword",
|
6179 | numericLiteral = "number",
|
6180 | bigintLiteral = "bigint",
|
6181 | operator = "operator",
|
6182 | stringLiteral = "string",
|
6183 | whiteSpace = "whitespace",
|
6184 | text = "text",
|
6185 | punctuation = "punctuation",
|
6186 | className = "class name",
|
6187 | enumName = "enum name",
|
6188 | interfaceName = "interface name",
|
6189 | moduleName = "module name",
|
6190 | typeParameterName = "type parameter name",
|
6191 | typeAliasName = "type alias name",
|
6192 | parameterName = "parameter name",
|
6193 | docCommentTagName = "doc comment tag name",
|
6194 | jsxOpenTagName = "jsx open tag name",
|
6195 | jsxCloseTagName = "jsx close tag name",
|
6196 | jsxSelfClosingTagName = "jsx self closing tag name",
|
6197 | jsxAttribute = "jsx attribute",
|
6198 | jsxText = "jsx text",
|
6199 | jsxAttributeStringLiteralValue = "jsx attribute string literal value"
|
6200 | }
|
6201 | enum ClassificationType {
|
6202 | comment = 1,
|
6203 | identifier = 2,
|
6204 | keyword = 3,
|
6205 | numericLiteral = 4,
|
6206 | operator = 5,
|
6207 | stringLiteral = 6,
|
6208 | regularExpressionLiteral = 7,
|
6209 | whiteSpace = 8,
|
6210 | text = 9,
|
6211 | punctuation = 10,
|
6212 | className = 11,
|
6213 | enumName = 12,
|
6214 | interfaceName = 13,
|
6215 | moduleName = 14,
|
6216 | typeParameterName = 15,
|
6217 | typeAliasName = 16,
|
6218 | parameterName = 17,
|
6219 | docCommentTagName = 18,
|
6220 | jsxOpenTagName = 19,
|
6221 | jsxCloseTagName = 20,
|
6222 | jsxSelfClosingTagName = 21,
|
6223 | jsxAttribute = 22,
|
6224 | jsxText = 23,
|
6225 | jsxAttributeStringLiteralValue = 24,
|
6226 | bigintLiteral = 25
|
6227 | }
|
6228 | }
|
6229 | declare namespace ts {
|
6230 | /** The classifier is used for syntactic highlighting in editors via the TSServer */
|
6231 | function createClassifier(): Classifier;
|
6232 | }
|
6233 | declare namespace ts {
|
6234 | interface DocumentHighlights {
|
6235 | fileName: string;
|
6236 | highlightSpans: HighlightSpan[];
|
6237 | }
|
6238 | }
|
6239 | declare namespace ts {
|
6240 | /**
|
6241 | * The document registry represents a store of SourceFile objects that can be shared between
|
6242 | * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST)
|
6243 | * of files in the context.
|
6244 | * SourceFile objects account for most of the memory usage by the language service. Sharing
|
6245 | * the same DocumentRegistry instance between different instances of LanguageService allow
|
6246 | * for more efficient memory utilization since all projects will share at least the library
|
6247 | * file (lib.d.ts).
|
6248 | *
|
6249 | * A more advanced use of the document registry is to serialize sourceFile objects to disk
|
6250 | * and re-hydrate them when needed.
|
6251 | *
|
6252 | * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it
|
6253 | * to all subsequent createLanguageService calls.
|
6254 | */
|
6255 | interface DocumentRegistry {
|
6256 | /**
|
6257 | * Request a stored SourceFile with a given fileName and compilationSettings.
|
6258 | * The first call to acquire will call createLanguageServiceSourceFile to generate
|
6259 | * the SourceFile if was not found in the registry.
|
6260 | *
|
6261 | * @param fileName The name of the file requested
|
6262 | * @param compilationSettings Some compilation settings like target affects the
|
6263 | * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
|
6264 | * multiple copies of the same file for different compilation settings.
|
6265 | * @param scriptSnapshot Text of the file. Only used if the file was not found
|
6266 | * in the registry and a new one was created.
|
6267 | * @param version Current version of the file. Only used if the file was not found
|
6268 | * in the registry and a new one was created.
|
6269 | */
|
6270 | acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
|
6271 | acquireDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
|
6272 | /**
|
6273 | * Request an updated version of an already existing SourceFile with a given fileName
|
6274 | * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile
|
6275 | * to get an updated SourceFile.
|
6276 | *
|
6277 | * @param fileName The name of the file requested
|
6278 | * @param compilationSettings Some compilation settings like target affects the
|
6279 | * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
|
6280 | * multiple copies of the same file for different compilation settings.
|
6281 | * @param scriptSnapshot Text of the file.
|
6282 | * @param version Current version of the file.
|
6283 | */
|
6284 | updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
|
6285 | updateDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
|
6286 | getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey;
|
6287 | /**
|
6288 | * Informs the DocumentRegistry that a file is not needed any longer.
|
6289 | *
|
6290 | * Note: It is not allowed to call release on a SourceFile that was not acquired from
|
6291 | * this registry originally.
|
6292 | *
|
6293 | * @param fileName The name of the file to be released
|
6294 | * @param compilationSettings The compilation settings used to acquire the file
|
6295 | */
|
6296 | releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
|
6297 | releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey): void;
|
6298 | reportStats(): string;
|
6299 | }
|
6300 | type DocumentRegistryBucketKey = string & {
|
6301 | __bucketKey: any;
|
6302 | };
|
6303 | function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry;
|
6304 | }
|
6305 | declare namespace ts {
|
6306 | function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo;
|
6307 | }
|
6308 | declare namespace ts {
|
6309 | interface TranspileOptions {
|
6310 | compilerOptions?: CompilerOptions;
|
6311 | fileName?: string;
|
6312 | reportDiagnostics?: boolean;
|
6313 | moduleName?: string;
|
6314 | renamedDependencies?: MapLike<string>;
|
6315 | transformers?: CustomTransformers;
|
6316 | }
|
6317 | interface TranspileOutput {
|
6318 | outputText: string;
|
6319 | diagnostics?: Diagnostic[];
|
6320 | sourceMapText?: string;
|
6321 | }
|
6322 | function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput;
|
6323 | function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string;
|
6324 | }
|
6325 | declare namespace ts {
|
6326 | /** The version of the language service API */
|
6327 | const servicesVersion = "0.8";
|
6328 | function toEditorSettings(options: EditorOptions | EditorSettings): EditorSettings;
|
6329 | function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string;
|
6330 | function getDefaultCompilerOptions(): CompilerOptions;
|
6331 | function getSupportedCodeFixes(): string[];
|
6332 | function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile;
|
6333 | function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean): SourceFile;
|
6334 | function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService;
|
6335 | /**
|
6336 | * Get the path of the default library files (lib.d.ts) as distributed with the typescript
|
6337 | * node package.
|
6338 | * The functionality is not supported if the ts module is consumed outside of a node module.
|
6339 | */
|
6340 | function getDefaultLibFilePath(options: CompilerOptions): string;
|
6341 | }
|
6342 | declare namespace ts {
|
6343 | /**
|
6344 | * Transform one or more nodes using the supplied transformers.
|
6345 | * @param source A single `Node` or an array of `Node` objects.
|
6346 | * @param transformers An array of `TransformerFactory` callbacks used to process the transformation.
|
6347 | * @param compilerOptions Optional compiler options.
|
6348 | */
|
6349 | function transform<T extends Node>(source: T | T[], transformers: TransformerFactory<T>[], compilerOptions?: CompilerOptions): TransformationResult<T>;
|
6350 | }
|
6351 | declare namespace ts.server {
|
6352 | interface CompressedData {
|
6353 | length: number;
|
6354 | compressionKind: string;
|
6355 | data: any;
|
6356 | }
|
6357 | type RequireResult = {
|
6358 | module: {};
|
6359 | error: undefined;
|
6360 | } | {
|
6361 | module: undefined;
|
6362 | error: {
|
6363 | stack?: string;
|
6364 | message?: string;
|
6365 | };
|
6366 | };
|
6367 | interface ServerHost extends System {
|
6368 | watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher;
|
6369 | watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher;
|
6370 | setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
|
6371 | clearTimeout(timeoutId: any): void;
|
6372 | setImmediate(callback: (...args: any[]) => void, ...args: any[]): any;
|
6373 | clearImmediate(timeoutId: any): void;
|
6374 | gc?(): void;
|
6375 | trace?(s: string): void;
|
6376 | require?(initialPath: string, moduleName: string): RequireResult;
|
6377 | }
|
6378 | }
|
6379 | declare namespace ts.server {
|
6380 | enum LogLevel {
|
6381 | terse = 0,
|
6382 | normal = 1,
|
6383 | requestTime = 2,
|
6384 | verbose = 3
|
6385 | }
|
6386 | const emptyArray: SortedReadonlyArray<never>;
|
6387 | interface Logger {
|
6388 | close(): void;
|
6389 | hasLevel(level: LogLevel): boolean;
|
6390 | loggingEnabled(): boolean;
|
6391 | perftrc(s: string): void;
|
6392 | info(s: string): void;
|
6393 | startGroup(): void;
|
6394 | endGroup(): void;
|
6395 | msg(s: string, type?: Msg): void;
|
6396 | getLogFileName(): string | undefined;
|
6397 | }
|
6398 | enum Msg {
|
6399 | Err = "Err",
|
6400 | Info = "Info",
|
6401 | Perf = "Perf"
|
6402 | }
|
6403 | namespace Msg {
|
6404 | /** @deprecated Only here for backwards-compatibility. Prefer just `Msg`. */
|
6405 | type Types = Msg;
|
6406 | }
|
6407 | function createInstallTypingsRequest(project: Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray<string>, cachePath?: string): DiscoverTypings;
|
6408 | namespace Errors {
|
6409 | function ThrowNoProject(): never;
|
6410 | function ThrowProjectLanguageServiceDisabled(): never;
|
6411 | function ThrowProjectDoesNotContainDocument(fileName: string, project: Project): never;
|
6412 | }
|
6413 | type NormalizedPath = string & {
|
6414 | __normalizedPathTag: any;
|
6415 | };
|
6416 | function toNormalizedPath(fileName: string): NormalizedPath;
|
6417 | function normalizedPathToPath(normalizedPath: NormalizedPath, currentDirectory: string, getCanonicalFileName: (f: string) => string): Path;
|
6418 | function asNormalizedPath(fileName: string): NormalizedPath;
|
6419 | interface NormalizedPathMap<T> {
|
6420 | get(path: NormalizedPath): T | undefined;
|
6421 | set(path: NormalizedPath, value: T): void;
|
6422 | contains(path: NormalizedPath): boolean;
|
6423 | remove(path: NormalizedPath): void;
|
6424 | }
|
6425 | function createNormalizedPathMap<T>(): NormalizedPathMap<T>;
|
6426 | function isInferredProjectName(name: string): boolean;
|
6427 | function makeInferredProjectName(counter: number): string;
|
6428 | function createSortedArray<T>(): SortedArray<T>;
|
6429 | }
|
6430 | /**
|
6431 | * Declaration module describing the TypeScript Server protocol
|
6432 | */
|
6433 | declare namespace ts.server.protocol {
|
6434 | enum CommandTypes {
|
6435 | JsxClosingTag = "jsxClosingTag",
|
6436 | Brace = "brace",
|
6437 | BraceCompletion = "braceCompletion",
|
6438 | GetSpanOfEnclosingComment = "getSpanOfEnclosingComment",
|
6439 | Change = "change",
|
6440 | Close = "close",
|
6441 | /** @deprecated Prefer CompletionInfo -- see comment on CompletionsResponse */
|
6442 | Completions = "completions",
|
6443 | CompletionInfo = "completionInfo",
|
6444 | CompletionDetails = "completionEntryDetails",
|
6445 | CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList",
|
6446 | CompileOnSaveEmitFile = "compileOnSaveEmitFile",
|
6447 | Configure = "configure",
|
6448 | Definition = "definition",
|
6449 | DefinitionAndBoundSpan = "definitionAndBoundSpan",
|
6450 | Implementation = "implementation",
|
6451 | Exit = "exit",
|
6452 | Format = "format",
|
6453 | Formatonkey = "formatonkey",
|
6454 | Geterr = "geterr",
|
6455 | GeterrForProject = "geterrForProject",
|
6456 | SemanticDiagnosticsSync = "semanticDiagnosticsSync",
|
6457 | SyntacticDiagnosticsSync = "syntacticDiagnosticsSync",
|
6458 | SuggestionDiagnosticsSync = "suggestionDiagnosticsSync",
|
6459 | NavBar = "navbar",
|
6460 | Navto = "navto",
|
6461 | NavTree = "navtree",
|
6462 | NavTreeFull = "navtree-full",
|
6463 | /** @deprecated */
|
6464 | Occurrences = "occurrences",
|
6465 | DocumentHighlights = "documentHighlights",
|
6466 | Open = "open",
|
6467 | Quickinfo = "quickinfo",
|
6468 | References = "references",
|
6469 | Reload = "reload",
|
6470 | Rename = "rename",
|
6471 | Saveto = "saveto",
|
6472 | SignatureHelp = "signatureHelp",
|
6473 | Status = "status",
|
6474 | TypeDefinition = "typeDefinition",
|
6475 | ProjectInfo = "projectInfo",
|
6476 | ReloadProjects = "reloadProjects",
|
6477 | Unknown = "unknown",
|
6478 | OpenExternalProject = "openExternalProject",
|
6479 | OpenExternalProjects = "openExternalProjects",
|
6480 | CloseExternalProject = "closeExternalProject",
|
6481 | UpdateOpen = "updateOpen",
|
6482 | GetOutliningSpans = "getOutliningSpans",
|
6483 | TodoComments = "todoComments",
|
6484 | Indentation = "indentation",
|
6485 | DocCommentTemplate = "docCommentTemplate",
|
6486 | CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects",
|
6487 | GetCodeFixes = "getCodeFixes",
|
6488 | GetCombinedCodeFix = "getCombinedCodeFix",
|
6489 | ApplyCodeActionCommand = "applyCodeActionCommand",
|
6490 | GetSupportedCodeFixes = "getSupportedCodeFixes",
|
6491 | GetApplicableRefactors = "getApplicableRefactors",
|
6492 | GetEditsForRefactor = "getEditsForRefactor",
|
6493 | OrganizeImports = "organizeImports",
|
6494 | GetEditsForFileRename = "getEditsForFileRename",
|
6495 | ConfigurePlugin = "configurePlugin",
|
6496 | SelectionRange = "selectionRange",
|
6497 | ToggleLineComment = "toggleLineComment",
|
6498 | ToggleMultilineComment = "toggleMultilineComment",
|
6499 | CommentSelection = "commentSelection",
|
6500 | UncommentSelection = "uncommentSelection",
|
6501 | PrepareCallHierarchy = "prepareCallHierarchy",
|
6502 | ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls",
|
6503 | ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls"
|
6504 | }
|
6505 | /**
|
6506 | * A TypeScript Server message
|
6507 | */
|
6508 | interface Message {
|
6509 | /**
|
6510 | * Sequence number of the message
|
6511 | */
|
6512 | seq: number;
|
6513 | /**
|
6514 | * One of "request", "response", or "event"
|
6515 | */
|
6516 | type: "request" | "response" | "event";
|
6517 | }
|
6518 | /**
|
6519 | * Client-initiated request message
|
6520 | */
|
6521 | interface Request extends Message {
|
6522 | type: "request";
|
6523 | /**
|
6524 | * The command to execute
|
6525 | */
|
6526 | command: string;
|
6527 | /**
|
6528 | * Object containing arguments for the command
|
6529 | */
|
6530 | arguments?: any;
|
6531 | }
|
6532 | /**
|
6533 | * Request to reload the project structure for all the opened files
|
6534 | */
|
6535 | interface ReloadProjectsRequest extends Message {
|
6536 | command: CommandTypes.ReloadProjects;
|
6537 | }
|
6538 | /**
|
6539 | * Server-initiated event message
|
6540 | */
|
6541 | interface Event extends Message {
|
6542 | type: "event";
|
6543 | /**
|
6544 | * Name of event
|
6545 | */
|
6546 | event: string;
|
6547 | /**
|
6548 | * Event-specific information
|
6549 | */
|
6550 | body?: any;
|
6551 | }
|
6552 | /**
|
6553 | * Response by server to client request message.
|
6554 | */
|
6555 | interface Response extends Message {
|
6556 | type: "response";
|
6557 | /**
|
6558 | * Sequence number of the request message.
|
6559 | */
|
6560 | request_seq: number;
|
6561 | /**
|
6562 | * Outcome of the request.
|
6563 | */
|
6564 | success: boolean;
|
6565 | /**
|
6566 | * The command requested.
|
6567 | */
|
6568 | command: string;
|
6569 | /**
|
6570 | * If success === false, this should always be provided.
|
6571 | * Otherwise, may (or may not) contain a success message.
|
6572 | */
|
6573 | message?: string;
|
6574 | /**
|
6575 | * Contains message body if success === true.
|
6576 | */
|
6577 | body?: any;
|
6578 | /**
|
6579 | * Contains extra information that plugin can include to be passed on
|
6580 | */
|
6581 | metadata?: unknown;
|
6582 | /**
|
6583 | * Exposes information about the performance of this request-response pair.
|
6584 | */
|
6585 | performanceData?: PerformanceData;
|
6586 | }
|
6587 | interface PerformanceData {
|
6588 | /**
|
6589 | * Time spent updating the program graph, in milliseconds.
|
6590 | */
|
6591 | updateGraphDurationMs?: number;
|
6592 | /**
|
6593 | * The time spent creating or updating the auto-import program, in milliseconds.
|
6594 | */
|
6595 | createAutoImportProviderProgramDurationMs?: number;
|
6596 | }
|
6597 | /**
|
6598 | * Arguments for FileRequest messages.
|
6599 | */
|
6600 | interface FileRequestArgs {
|
6601 | /**
|
6602 | * The file for the request (absolute pathname required).
|
6603 | */
|
6604 | file: string;
|
6605 | projectFileName?: string;
|
6606 | }
|
6607 | interface StatusRequest extends Request {
|
6608 | command: CommandTypes.Status;
|
6609 | }
|
6610 | interface StatusResponseBody {
|
6611 | /**
|
6612 | * The TypeScript version (`ts.version`).
|
6613 | */
|
6614 | version: string;
|
6615 | }
|
6616 | /**
|
6617 | * Response to StatusRequest
|
6618 | */
|
6619 | interface StatusResponse extends Response {
|
6620 | body: StatusResponseBody;
|
6621 | }
|
6622 | /**
|
6623 | * Requests a JS Doc comment template for a given position
|
6624 | */
|
6625 | interface DocCommentTemplateRequest extends FileLocationRequest {
|
6626 | command: CommandTypes.DocCommentTemplate;
|
6627 | }
|
6628 | /**
|
6629 | * Response to DocCommentTemplateRequest
|
6630 | */
|
6631 | interface DocCommandTemplateResponse extends Response {
|
6632 | body?: TextInsertion;
|
6633 | }
|
6634 | /**
|
6635 | * A request to get TODO comments from the file
|
6636 | */
|
6637 | interface TodoCommentRequest extends FileRequest {
|
6638 | command: CommandTypes.TodoComments;
|
6639 | arguments: TodoCommentRequestArgs;
|
6640 | }
|
6641 | /**
|
6642 | * Arguments for TodoCommentRequest request.
|
6643 | */
|
6644 | interface TodoCommentRequestArgs extends FileRequestArgs {
|
6645 | /**
|
6646 | * Array of target TodoCommentDescriptors that describes TODO comments to be found
|
6647 | */
|
6648 | descriptors: TodoCommentDescriptor[];
|
6649 | }
|
6650 | /**
|
6651 | * Response for TodoCommentRequest request.
|
6652 | */
|
6653 | interface TodoCommentsResponse extends Response {
|
6654 | body?: TodoComment[];
|
6655 | }
|
6656 | /**
|
6657 | * A request to determine if the caret is inside a comment.
|
6658 | */
|
6659 | interface SpanOfEnclosingCommentRequest extends FileLocationRequest {
|
6660 | command: CommandTypes.GetSpanOfEnclosingComment;
|
6661 | arguments: SpanOfEnclosingCommentRequestArgs;
|
6662 | }
|
6663 | interface SpanOfEnclosingCommentRequestArgs extends FileLocationRequestArgs {
|
6664 | /**
|
6665 | * Requires that the enclosing span be a multi-line comment, or else the request returns undefined.
|
6666 | */
|
6667 | onlyMultiLine: boolean;
|
6668 | }
|
6669 | /**
|
6670 | * Request to obtain outlining spans in file.
|
6671 | */
|
6672 | interface OutliningSpansRequest extends FileRequest {
|
6673 | command: CommandTypes.GetOutliningSpans;
|
6674 | }
|
6675 | interface OutliningSpan {
|
6676 | /** The span of the document to actually collapse. */
|
6677 | textSpan: TextSpan;
|
6678 | /** The span of the document to display when the user hovers over the collapsed span. */
|
6679 | hintSpan: TextSpan;
|
6680 | /** The text to display in the editor for the collapsed region. */
|
6681 | bannerText: string;
|
6682 | /**
|
6683 | * Whether or not this region should be automatically collapsed when
|
6684 | * the 'Collapse to Definitions' command is invoked.
|
6685 | */
|
6686 | autoCollapse: boolean;
|
6687 | /**
|
6688 | * Classification of the contents of the span
|
6689 | */
|
6690 | kind: OutliningSpanKind;
|
6691 | }
|
6692 | /**
|
6693 | * Response to OutliningSpansRequest request.
|
6694 | */
|
6695 | interface OutliningSpansResponse extends Response {
|
6696 | body?: OutliningSpan[];
|
6697 | }
|
6698 | /**
|
6699 | * A request to get indentation for a location in file
|
6700 | */
|
6701 | interface IndentationRequest extends FileLocationRequest {
|
6702 | command: CommandTypes.Indentation;
|
6703 | arguments: IndentationRequestArgs;
|
6704 | }
|
6705 | /**
|
6706 | * Response for IndentationRequest request.
|
6707 | */
|
6708 | interface IndentationResponse extends Response {
|
6709 | body?: IndentationResult;
|
6710 | }
|
6711 | /**
|
6712 | * Indentation result representing where indentation should be placed
|
6713 | */
|
6714 | interface IndentationResult {
|
6715 | /**
|
6716 | * The base position in the document that the indent should be relative to
|
6717 | */
|
6718 | position: number;
|
6719 | /**
|
6720 | * The number of columns the indent should be at relative to the position's column.
|
6721 | */
|
6722 | indentation: number;
|
6723 | }
|
6724 | /**
|
6725 | * Arguments for IndentationRequest request.
|
6726 | */
|
6727 | interface IndentationRequestArgs extends FileLocationRequestArgs {
|
6728 | /**
|
6729 | * An optional set of settings to be used when computing indentation.
|
6730 | * If argument is omitted - then it will use settings for file that were previously set via 'configure' request or global settings.
|
6731 | */
|
6732 | options?: EditorSettings;
|
6733 | }
|
6734 | /**
|
6735 | * Arguments for ProjectInfoRequest request.
|
6736 | */
|
6737 | interface ProjectInfoRequestArgs extends FileRequestArgs {
|
6738 | /**
|
6739 | * Indicate if the file name list of the project is needed
|
6740 | */
|
6741 | needFileNameList: boolean;
|
6742 | }
|
6743 | /**
|
6744 | * A request to get the project information of the current file.
|
6745 | */
|
6746 | interface ProjectInfoRequest extends Request {
|
6747 | command: CommandTypes.ProjectInfo;
|
6748 | arguments: ProjectInfoRequestArgs;
|
6749 | }
|
6750 | /**
|
6751 | * A request to retrieve compiler options diagnostics for a project
|
6752 | */
|
6753 | interface CompilerOptionsDiagnosticsRequest extends Request {
|
6754 | arguments: CompilerOptionsDiagnosticsRequestArgs;
|
6755 | }
|
6756 | /**
|
6757 | * Arguments for CompilerOptionsDiagnosticsRequest request.
|
6758 | */
|
6759 | interface CompilerOptionsDiagnosticsRequestArgs {
|
6760 | /**
|
6761 | * Name of the project to retrieve compiler options diagnostics.
|
6762 | */
|
6763 | projectFileName: string;
|
6764 | }
|
6765 | /**
|
6766 | * Response message body for "projectInfo" request
|
6767 | */
|
6768 | interface ProjectInfo {
|
6769 | /**
|
6770 | * For configured project, this is the normalized path of the 'tsconfig.json' file
|
6771 | * For inferred project, this is undefined
|
6772 | */
|
6773 | configFileName: string;
|
6774 | /**
|
6775 | * The list of normalized file name in the project, including 'lib.d.ts'
|
6776 | */
|
6777 | fileNames?: string[];
|
6778 | /**
|
6779 | * Indicates if the project has a active language service instance
|
6780 | */
|
6781 | languageServiceDisabled?: boolean;
|
6782 | }
|
6783 | /**
|
6784 | * Represents diagnostic info that includes location of diagnostic in two forms
|
6785 | * - start position and length of the error span
|
6786 | * - startLocation and endLocation - a pair of Location objects that store start/end line and offset of the error span.
|
6787 | */
|
6788 | interface DiagnosticWithLinePosition {
|
6789 | message: string;
|
6790 | start: number;
|
6791 | length: number;
|
6792 | startLocation: Location;
|
6793 | endLocation: Location;
|
6794 | category: string;
|
6795 | code: number;
|
6796 | /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
|
6797 | reportsUnnecessary?: {};
|
6798 | reportsDeprecated?: {};
|
6799 | relatedInformation?: DiagnosticRelatedInformation[];
|
6800 | }
|
6801 | /**
|
6802 | * Response message for "projectInfo" request
|
6803 | */
|
6804 | interface ProjectInfoResponse extends Response {
|
6805 | body?: ProjectInfo;
|
6806 | }
|
6807 | /**
|
6808 | * Request whose sole parameter is a file name.
|
6809 | */
|
6810 | interface FileRequest extends Request {
|
6811 | arguments: FileRequestArgs;
|
6812 | }
|
6813 | /**
|
6814 | * Instances of this interface specify a location in a source file:
|
6815 | * (file, line, character offset), where line and character offset are 1-based.
|
6816 | */
|
6817 | interface FileLocationRequestArgs extends FileRequestArgs {
|
6818 | /**
|
6819 | * The line number for the request (1-based).
|
6820 | */
|
6821 | line: number;
|
6822 | /**
|
6823 | * The character offset (on the line) for the request (1-based).
|
6824 | */
|
6825 | offset: number;
|
6826 | }
|
6827 | type FileLocationOrRangeRequestArgs = FileLocationRequestArgs | FileRangeRequestArgs;
|
6828 | /**
|
6829 | * Request refactorings at a given position or selection area.
|
6830 | */
|
6831 | interface GetApplicableRefactorsRequest extends Request {
|
6832 | command: CommandTypes.GetApplicableRefactors;
|
6833 | arguments: GetApplicableRefactorsRequestArgs;
|
6834 | }
|
6835 | type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs & {
|
6836 | triggerReason?: RefactorTriggerReason;
|
6837 | };
|
6838 | type RefactorTriggerReason = "implicit" | "invoked";
|
6839 | /**
|
6840 | * Response is a list of available refactorings.
|
6841 | * Each refactoring exposes one or more "Actions"; a user selects one action to invoke a refactoring
|
6842 | */
|
6843 | interface GetApplicableRefactorsResponse extends Response {
|
6844 | body?: ApplicableRefactorInfo[];
|
6845 | }
|
6846 | /**
|
6847 | * A set of one or more available refactoring actions, grouped under a parent refactoring.
|
6848 | */
|
6849 | interface ApplicableRefactorInfo {
|
6850 | /**
|
6851 | * The programmatic name of the refactoring
|
6852 | */
|
6853 | name: string;
|
6854 | /**
|
6855 | * A description of this refactoring category to show to the user.
|
6856 | * If the refactoring gets inlined (see below), this text will not be visible.
|
6857 | */
|
6858 | description: string;
|
6859 | /**
|
6860 | * Inlineable refactorings can have their actions hoisted out to the top level
|
6861 | * of a context menu. Non-inlineanable refactorings should always be shown inside
|
6862 | * their parent grouping.
|
6863 | *
|
6864 | * If not specified, this value is assumed to be 'true'
|
6865 | */
|
6866 | inlineable?: boolean;
|
6867 | actions: RefactorActionInfo[];
|
6868 | }
|
6869 | /**
|
6870 | * Represents a single refactoring action - for example, the "Extract Method..." refactor might
|
6871 | * offer several actions, each corresponding to a surround class or closure to extract into.
|
6872 | */
|
6873 | interface RefactorActionInfo {
|
6874 | /**
|
6875 | * The programmatic name of the refactoring action
|
6876 | */
|
6877 | name: string;
|
6878 | /**
|
6879 | * A description of this refactoring action to show to the user.
|
6880 | * If the parent refactoring is inlined away, this will be the only text shown,
|
6881 | * so this description should make sense by itself if the parent is inlineable=true
|
6882 | */
|
6883 | description: string;
|
6884 | /**
|
6885 | * A message to show to the user if the refactoring cannot be applied in
|
6886 | * the current context.
|
6887 | */
|
6888 | notApplicableReason?: string;
|
6889 | }
|
6890 | interface GetEditsForRefactorRequest extends Request {
|
6891 | command: CommandTypes.GetEditsForRefactor;
|
6892 | arguments: GetEditsForRefactorRequestArgs;
|
6893 | }
|
6894 | /**
|
6895 | * Request the edits that a particular refactoring action produces.
|
6896 | * Callers must specify the name of the refactor and the name of the action.
|
6897 | */
|
6898 | type GetEditsForRefactorRequestArgs = FileLocationOrRangeRequestArgs & {
|
6899 | refactor: string;
|
6900 | action: string;
|
6901 | };
|
6902 | interface GetEditsForRefactorResponse extends Response {
|
6903 | body?: RefactorEditInfo;
|
6904 | }
|
6905 | interface RefactorEditInfo {
|
6906 | edits: FileCodeEdits[];
|
6907 | /**
|
6908 | * An optional location where the editor should start a rename operation once
|
6909 | * the refactoring edits have been applied
|
6910 | */
|
6911 | renameLocation?: Location;
|
6912 | renameFilename?: string;
|
6913 | }
|
6914 | /**
|
6915 | * Organize imports by:
|
6916 | * 1) Removing unused imports
|
6917 | * 2) Coalescing imports from the same module
|
6918 | * 3) Sorting imports
|
6919 | */
|
6920 | interface OrganizeImportsRequest extends Request {
|
6921 | command: CommandTypes.OrganizeImports;
|
6922 | arguments: OrganizeImportsRequestArgs;
|
6923 | }
|
6924 | type OrganizeImportsScope = GetCombinedCodeFixScope;
|
6925 | interface OrganizeImportsRequestArgs {
|
6926 | scope: OrganizeImportsScope;
|
6927 | }
|
6928 | interface OrganizeImportsResponse extends Response {
|
6929 | body: readonly FileCodeEdits[];
|
6930 | }
|
6931 | interface GetEditsForFileRenameRequest extends Request {
|
6932 | command: CommandTypes.GetEditsForFileRename;
|
6933 | arguments: GetEditsForFileRenameRequestArgs;
|
6934 | }
|
6935 | /** Note: Paths may also be directories. */
|
6936 | interface GetEditsForFileRenameRequestArgs {
|
6937 | readonly oldFilePath: string;
|
6938 | readonly newFilePath: string;
|
6939 | }
|
6940 | interface GetEditsForFileRenameResponse extends Response {
|
6941 | body: readonly FileCodeEdits[];
|
6942 | }
|
6943 | /**
|
6944 | * Request for the available codefixes at a specific position.
|
6945 | */
|
6946 | interface CodeFixRequest extends Request {
|
6947 | command: CommandTypes.GetCodeFixes;
|
6948 | arguments: CodeFixRequestArgs;
|
6949 | }
|
6950 | interface GetCombinedCodeFixRequest extends Request {
|
6951 | command: CommandTypes.GetCombinedCodeFix;
|
6952 | arguments: GetCombinedCodeFixRequestArgs;
|
6953 | }
|
6954 | interface GetCombinedCodeFixResponse extends Response {
|
6955 | body: CombinedCodeActions;
|
6956 | }
|
6957 | interface ApplyCodeActionCommandRequest extends Request {
|
6958 | command: CommandTypes.ApplyCodeActionCommand;
|
6959 | arguments: ApplyCodeActionCommandRequestArgs;
|
6960 | }
|
6961 | interface ApplyCodeActionCommandResponse extends Response {
|
6962 | }
|
6963 | interface FileRangeRequestArgs extends FileRequestArgs {
|
6964 | /**
|
6965 | * The line number for the request (1-based).
|
6966 | */
|
6967 | startLine: number;
|
6968 | /**
|
6969 | * The character offset (on the line) for the request (1-based).
|
6970 | */
|
6971 | startOffset: number;
|
6972 | /**
|
6973 | * The line number for the request (1-based).
|
6974 | */
|
6975 | endLine: number;
|
6976 | /**
|
6977 | * The character offset (on the line) for the request (1-based).
|
6978 | */
|
6979 | endOffset: number;
|
6980 | }
|
6981 | /**
|
6982 | * Instances of this interface specify errorcodes on a specific location in a sourcefile.
|
6983 | */
|
6984 | interface CodeFixRequestArgs extends FileRangeRequestArgs {
|
6985 | /**
|
6986 | * Errorcodes we want to get the fixes for.
|
6987 | */
|
6988 | errorCodes: readonly number[];
|
6989 | }
|
6990 | interface GetCombinedCodeFixRequestArgs {
|
6991 | scope: GetCombinedCodeFixScope;
|
6992 | fixId: {};
|
6993 | }
|
6994 | interface GetCombinedCodeFixScope {
|
6995 | type: "file";
|
6996 | args: FileRequestArgs;
|
6997 | }
|
6998 | interface ApplyCodeActionCommandRequestArgs {
|
6999 | /** May also be an array of commands. */
|
7000 | command: {};
|
7001 | }
|
7002 | /**
|
7003 | * Response for GetCodeFixes request.
|
7004 | */
|
7005 | interface GetCodeFixesResponse extends Response {
|
7006 | body?: CodeAction[];
|
7007 | }
|
7008 | /**
|
7009 | * A request whose arguments specify a file location (file, line, col).
|
7010 | */
|
7011 | interface FileLocationRequest extends FileRequest {
|
7012 | arguments: FileLocationRequestArgs;
|
7013 | }
|
7014 | /**
|
7015 | * A request to get codes of supported code fixes.
|
7016 | */
|
7017 | interface GetSupportedCodeFixesRequest extends Request {
|
7018 | command: CommandTypes.GetSupportedCodeFixes;
|
7019 | }
|
7020 | /**
|
7021 | * A response for GetSupportedCodeFixesRequest request.
|
7022 | */
|
7023 | interface GetSupportedCodeFixesResponse extends Response {
|
7024 | /**
|
7025 | * List of error codes supported by the server.
|
7026 | */
|
7027 | body?: string[];
|
7028 | }
|
7029 | /**
|
7030 | * Arguments in document highlight request; include: filesToSearch, file,
|
7031 | * line, offset.
|
7032 | */
|
7033 | interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs {
|
7034 | /**
|
7035 | * List of files to search for document highlights.
|
7036 | */
|
7037 | filesToSearch: string[];
|
7038 | }
|
7039 | /**
|
7040 | * Go to definition request; value of command field is
|
7041 | * "definition". Return response giving the file locations that
|
7042 | * define the symbol found in file at location line, col.
|
7043 | */
|
7044 | interface DefinitionRequest extends FileLocationRequest {
|
7045 | command: CommandTypes.Definition;
|
7046 | }
|
7047 | interface DefinitionAndBoundSpanRequest extends FileLocationRequest {
|
7048 | readonly command: CommandTypes.DefinitionAndBoundSpan;
|
7049 | }
|
7050 | interface DefinitionAndBoundSpanResponse extends Response {
|
7051 | readonly body: DefinitionInfoAndBoundSpan;
|
7052 | }
|
7053 | /**
|
7054 | * Go to type request; value of command field is
|
7055 | * "typeDefinition". Return response giving the file locations that
|
7056 | * define the type for the symbol found in file at location line, col.
|
7057 | */
|
7058 | interface TypeDefinitionRequest extends FileLocationRequest {
|
7059 | command: CommandTypes.TypeDefinition;
|
7060 | }
|
7061 | /**
|
7062 | * Go to implementation request; value of command field is
|
7063 | * "implementation". Return response giving the file locations that
|
7064 | * implement the symbol found in file at location line, col.
|
7065 | */
|
7066 | interface ImplementationRequest extends FileLocationRequest {
|
7067 | command: CommandTypes.Implementation;
|
7068 | }
|
7069 | /**
|
7070 | * Location in source code expressed as (one-based) line and (one-based) column offset.
|
7071 | */
|
7072 | interface Location {
|
7073 | line: number;
|
7074 | offset: number;
|
7075 | }
|
7076 | /**
|
7077 | * Object found in response messages defining a span of text in source code.
|
7078 | */
|
7079 | interface TextSpan {
|
7080 | /**
|
7081 | * First character of the definition.
|
7082 | */
|
7083 | start: Location;
|
7084 | /**
|
7085 | * One character past last character of the definition.
|
7086 | */
|
7087 | end: Location;
|
7088 | }
|
7089 | /**
|
7090 | * Object found in response messages defining a span of text in a specific source file.
|
7091 | */
|
7092 | interface FileSpan extends TextSpan {
|
7093 | /**
|
7094 | * File containing text span.
|
7095 | */
|
7096 | file: string;
|
7097 | }
|
7098 | interface TextSpanWithContext extends TextSpan {
|
7099 | contextStart?: Location;
|
7100 | contextEnd?: Location;
|
7101 | }
|
7102 | interface FileSpanWithContext extends FileSpan, TextSpanWithContext {
|
7103 | }
|
7104 | interface DefinitionInfoAndBoundSpan {
|
7105 | definitions: readonly FileSpanWithContext[];
|
7106 | textSpan: TextSpan;
|
7107 | }
|
7108 | /**
|
7109 | * Definition response message. Gives text range for definition.
|
7110 | */
|
7111 | interface DefinitionResponse extends Response {
|
7112 | body?: FileSpanWithContext[];
|
7113 | }
|
7114 | interface DefinitionInfoAndBoundSpanResponse extends Response {
|
7115 | body?: DefinitionInfoAndBoundSpan;
|
7116 | }
|
7117 | /** @deprecated Use `DefinitionInfoAndBoundSpanResponse` instead. */
|
7118 | type DefinitionInfoAndBoundSpanReponse = DefinitionInfoAndBoundSpanResponse;
|
7119 | /**
|
7120 | * Definition response message. Gives text range for definition.
|
7121 | */
|
7122 | interface TypeDefinitionResponse extends Response {
|
7123 | body?: FileSpanWithContext[];
|
7124 | }
|
7125 | /**
|
7126 | * Implementation response message. Gives text range for implementations.
|
7127 | */
|
7128 | interface ImplementationResponse extends Response {
|
7129 | body?: FileSpanWithContext[];
|
7130 | }
|
7131 | /**
|
7132 | * Request to get brace completion for a location in the file.
|
7133 | */
|
7134 | interface BraceCompletionRequest extends FileLocationRequest {
|
7135 | command: CommandTypes.BraceCompletion;
|
7136 | arguments: BraceCompletionRequestArgs;
|
7137 | }
|
7138 | /**
|
7139 | * Argument for BraceCompletionRequest request.
|
7140 | */
|
7141 | interface BraceCompletionRequestArgs extends FileLocationRequestArgs {
|
7142 | /**
|
7143 | * Kind of opening brace
|
7144 | */
|
7145 | openingBrace: string;
|
7146 | }
|
7147 | interface JsxClosingTagRequest extends FileLocationRequest {
|
7148 | readonly command: CommandTypes.JsxClosingTag;
|
7149 | readonly arguments: JsxClosingTagRequestArgs;
|
7150 | }
|
7151 | interface JsxClosingTagRequestArgs extends FileLocationRequestArgs {
|
7152 | }
|
7153 | interface JsxClosingTagResponse extends Response {
|
7154 | readonly body: TextInsertion;
|
7155 | }
|
7156 | /**
|
7157 | * @deprecated
|
7158 | * Get occurrences request; value of command field is
|
7159 | * "occurrences". Return response giving spans that are relevant
|
7160 | * in the file at a given line and column.
|
7161 | */
|
7162 | interface OccurrencesRequest extends FileLocationRequest {
|
7163 | command: CommandTypes.Occurrences;
|
7164 | }
|
7165 | /** @deprecated */
|
7166 | interface OccurrencesResponseItem extends FileSpanWithContext {
|
7167 | /**
|
7168 | * True if the occurrence is a write location, false otherwise.
|
7169 | */
|
7170 | isWriteAccess: boolean;
|
7171 | /**
|
7172 | * True if the occurrence is in a string, undefined otherwise;
|
7173 | */
|
7174 | isInString?: true;
|
7175 | }
|
7176 | /** @deprecated */
|
7177 | interface OccurrencesResponse extends Response {
|
7178 | body?: OccurrencesResponseItem[];
|
7179 | }
|
7180 | /**
|
7181 | * Get document highlights request; value of command field is
|
7182 | * "documentHighlights". Return response giving spans that are relevant
|
7183 | * in the file at a given line and column.
|
7184 | */
|
7185 | interface DocumentHighlightsRequest extends FileLocationRequest {
|
7186 | command: CommandTypes.DocumentHighlights;
|
7187 | arguments: DocumentHighlightsRequestArgs;
|
7188 | }
|
7189 | /**
|
7190 | * Span augmented with extra information that denotes the kind of the highlighting to be used for span.
|
7191 | */
|
7192 | interface HighlightSpan extends TextSpanWithContext {
|
7193 | kind: HighlightSpanKind;
|
7194 | }
|
7195 | /**
|
7196 | * Represents a set of highligh spans for a give name
|
7197 | */
|
7198 | interface DocumentHighlightsItem {
|
7199 | /**
|
7200 | * File containing highlight spans.
|
7201 | */
|
7202 | file: string;
|
7203 | /**
|
7204 | * Spans to highlight in file.
|
7205 | */
|
7206 | highlightSpans: HighlightSpan[];
|
7207 | }
|
7208 | /**
|
7209 | * Response for a DocumentHighlightsRequest request.
|
7210 | */
|
7211 | interface DocumentHighlightsResponse extends Response {
|
7212 | body?: DocumentHighlightsItem[];
|
7213 | }
|
7214 | /**
|
7215 | * Find references request; value of command field is
|
7216 | * "references". Return response giving the file locations that
|
7217 | * reference the symbol found in file at location line, col.
|
7218 | */
|
7219 | interface ReferencesRequest extends FileLocationRequest {
|
7220 | command: CommandTypes.References;
|
7221 | }
|
7222 | interface ReferencesResponseItem extends FileSpanWithContext {
|
7223 | /** Text of line containing the reference. Including this
|
7224 | * with the response avoids latency of editor loading files
|
7225 | * to show text of reference line (the server already has
|
7226 | * loaded the referencing files).
|
7227 | */
|
7228 | lineText: string;
|
7229 | /**
|
7230 | * True if reference is a write location, false otherwise.
|
7231 | */
|
7232 | isWriteAccess: boolean;
|
7233 | /**
|
7234 | * True if reference is a definition, false otherwise.
|
7235 | */
|
7236 | isDefinition: boolean;
|
7237 | }
|
7238 | /**
|
7239 | * The body of a "references" response message.
|
7240 | */
|
7241 | interface ReferencesResponseBody {
|
7242 | /**
|
7243 | * The file locations referencing the symbol.
|
7244 | */
|
7245 | refs: readonly ReferencesResponseItem[];
|
7246 | /**
|
7247 | * The name of the symbol.
|
7248 | */
|
7249 | symbolName: string;
|
7250 | /**
|
7251 | * The start character offset of the symbol (on the line provided by the references request).
|
7252 | */
|
7253 | symbolStartOffset: number;
|
7254 | /**
|
7255 | * The full display name of the symbol.
|
7256 | */
|
7257 | symbolDisplayString: string;
|
7258 | }
|
7259 | /**
|
7260 | * Response to "references" request.
|
7261 | */
|
7262 | interface ReferencesResponse extends Response {
|
7263 | body?: ReferencesResponseBody;
|
7264 | }
|
7265 | /**
|
7266 | * Argument for RenameRequest request.
|
7267 | */
|
7268 | interface RenameRequestArgs extends FileLocationRequestArgs {
|
7269 | /**
|
7270 | * Should text at specified location be found/changed in comments?
|
7271 | */
|
7272 | findInComments?: boolean;
|
7273 | /**
|
7274 | * Should text at specified location be found/changed in strings?
|
7275 | */
|
7276 | findInStrings?: boolean;
|
7277 | }
|
7278 | /**
|
7279 | * Rename request; value of command field is "rename". Return
|
7280 | * response giving the file locations that reference the symbol
|
7281 | * found in file at location line, col. Also return full display
|
7282 | * name of the symbol so that client can print it unambiguously.
|
7283 | */
|
7284 | interface RenameRequest extends FileLocationRequest {
|
7285 | command: CommandTypes.Rename;
|
7286 | arguments: RenameRequestArgs;
|
7287 | }
|
7288 | /**
|
7289 | * Information about the item to be renamed.
|
7290 | */
|
7291 | type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
|
7292 | interface RenameInfoSuccess {
|
7293 | /**
|
7294 | * True if item can be renamed.
|
7295 | */
|
7296 | canRename: true;
|
7297 | /**
|
7298 | * File or directory to rename.
|
7299 | * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`.
|
7300 | */
|
7301 | fileToRename?: string;
|
7302 | /**
|
7303 | * Display name of the item to be renamed.
|
7304 | */
|
7305 | displayName: string;
|
7306 | /**
|
7307 | * Full display name of item to be renamed.
|
7308 | */
|
7309 | fullDisplayName: string;
|
7310 | /**
|
7311 | * The items's kind (such as 'className' or 'parameterName' or plain 'text').
|
7312 | */
|
7313 | kind: ScriptElementKind;
|
7314 | /**
|
7315 | * Optional modifiers for the kind (such as 'public').
|
7316 | */
|
7317 | kindModifiers: string;
|
7318 | /** Span of text to rename. */
|
7319 | triggerSpan: TextSpan;
|
7320 | }
|
7321 | interface RenameInfoFailure {
|
7322 | canRename: false;
|
7323 | /**
|
7324 | * Error message if item can not be renamed.
|
7325 | */
|
7326 | localizedErrorMessage: string;
|
7327 | }
|
7328 | /**
|
7329 | * A group of text spans, all in 'file'.
|
7330 | */
|
7331 | interface SpanGroup {
|
7332 | /** The file to which the spans apply */
|
7333 | file: string;
|
7334 | /** The text spans in this group */
|
7335 | locs: RenameTextSpan[];
|
7336 | }
|
7337 | interface RenameTextSpan extends TextSpanWithContext {
|
7338 | readonly prefixText?: string;
|
7339 | readonly suffixText?: string;
|
7340 | }
|
7341 | interface RenameResponseBody {
|
7342 | /**
|
7343 | * Information about the item to be renamed.
|
7344 | */
|
7345 | info: RenameInfo;
|
7346 | /**
|
7347 | * An array of span groups (one per file) that refer to the item to be renamed.
|
7348 | */
|
7349 | locs: readonly SpanGroup[];
|
7350 | }
|
7351 | /**
|
7352 | * Rename response message.
|
7353 | */
|
7354 | interface RenameResponse extends Response {
|
7355 | body?: RenameResponseBody;
|
7356 | }
|
7357 | /**
|
7358 | * Represents a file in external project.
|
7359 | * External project is project whose set of files, compilation options and open\close state
|
7360 | * is maintained by the client (i.e. if all this data come from .csproj file in Visual Studio).
|
7361 | * External project will exist even if all files in it are closed and should be closed explicitly.
|
7362 | * If external project includes one or more tsconfig.json/jsconfig.json files then tsserver will
|
7363 | * create configured project for every config file but will maintain a link that these projects were created
|
7364 | * as a result of opening external project so they should be removed once external project is closed.
|
7365 | */
|
7366 | interface ExternalFile {
|
7367 | /**
|
7368 | * Name of file file
|
7369 | */
|
7370 | fileName: string;
|
7371 | /**
|
7372 | * Script kind of the file
|
7373 | */
|
7374 | scriptKind?: ScriptKindName | ts.ScriptKind;
|
7375 | /**
|
7376 | * Whether file has mixed content (i.e. .cshtml file that combines html markup with C#/JavaScript)
|
7377 | */
|
7378 | hasMixedContent?: boolean;
|
7379 | /**
|
7380 | * Content of the file
|
7381 | */
|
7382 | content?: string;
|
7383 | }
|
7384 | /**
|
7385 | * Represent an external project
|
7386 | */
|
7387 | interface ExternalProject {
|
7388 | /**
|
7389 | * Project name
|
7390 | */
|
7391 | projectFileName: string;
|
7392 | /**
|
7393 | * List of root files in project
|
7394 | */
|
7395 | rootFiles: ExternalFile[];
|
7396 | /**
|
7397 | * Compiler options for the project
|
7398 | */
|
7399 | options: ExternalProjectCompilerOptions;
|
7400 | /**
|
7401 | * @deprecated typingOptions. Use typeAcquisition instead
|
7402 | */
|
7403 | typingOptions?: TypeAcquisition;
|
7404 | /**
|
7405 | * Explicitly specified type acquisition for the project
|
7406 | */
|
7407 | typeAcquisition?: TypeAcquisition;
|
7408 | }
|
7409 | interface CompileOnSaveMixin {
|
7410 | /**
|
7411 | * If compile on save is enabled for the project
|
7412 | */
|
7413 | compileOnSave?: boolean;
|
7414 | }
|
7415 | /**
|
7416 | * For external projects, some of the project settings are sent together with
|
7417 | * compiler settings.
|
7418 | */
|
7419 | type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions;
|
7420 | interface FileWithProjectReferenceRedirectInfo {
|
7421 | /**
|
7422 | * Name of file
|
7423 | */
|
7424 | fileName: string;
|
7425 | /**
|
7426 | * True if the file is primarily included in a referenced project
|
7427 | */
|
7428 | isSourceOfProjectReferenceRedirect: boolean;
|
7429 | }
|
7430 | /**
|
7431 | * Represents a set of changes that happen in project
|
7432 | */
|
7433 | interface ProjectChanges {
|
7434 | /**
|
7435 | * List of added files
|
7436 | */
|
7437 | added: string[] | FileWithProjectReferenceRedirectInfo[];
|
7438 | /**
|
7439 | * List of removed files
|
7440 | */
|
7441 | removed: string[] | FileWithProjectReferenceRedirectInfo[];
|
7442 | /**
|
7443 | * List of updated files
|
7444 | */
|
7445 | updated: string[] | FileWithProjectReferenceRedirectInfo[];
|
7446 | /**
|
7447 | * List of files that have had their project reference redirect status updated
|
7448 | * Only provided when the synchronizeProjectList request has includeProjectReferenceRedirectInfo set to true
|
7449 | */
|
7450 | updatedRedirects?: FileWithProjectReferenceRedirectInfo[];
|
7451 | }
|
7452 | /**
|
7453 | * Information found in a configure request.
|
7454 | */
|
7455 | interface ConfigureRequestArguments {
|
7456 | /**
|
7457 | * Information about the host, for example 'Emacs 24.4' or
|
7458 | * 'Sublime Text version 3075'
|
7459 | */
|
7460 | hostInfo?: string;
|
7461 | /**
|
7462 | * If present, tab settings apply only to this file.
|
7463 | */
|
7464 | file?: string;
|
7465 | /**
|
7466 | * The format options to use during formatting and other code editing features.
|
7467 | */
|
7468 | formatOptions?: FormatCodeSettings;
|
7469 | preferences?: UserPreferences;
|
7470 | /**
|
7471 | * The host's additional supported .js file extensions
|
7472 | */
|
7473 | extraFileExtensions?: FileExtensionInfo[];
|
7474 | watchOptions?: WatchOptions;
|
7475 | }
|
7476 | enum WatchFileKind {
|
7477 | FixedPollingInterval = "FixedPollingInterval",
|
7478 | PriorityPollingInterval = "PriorityPollingInterval",
|
7479 | DynamicPriorityPolling = "DynamicPriorityPolling",
|
7480 | UseFsEvents = "UseFsEvents",
|
7481 | UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory"
|
7482 | }
|
7483 | enum WatchDirectoryKind {
|
7484 | UseFsEvents = "UseFsEvents",
|
7485 | FixedPollingInterval = "FixedPollingInterval",
|
7486 | DynamicPriorityPolling = "DynamicPriorityPolling"
|
7487 | }
|
7488 | enum PollingWatchKind {
|
7489 | FixedInterval = "FixedInterval",
|
7490 | PriorityInterval = "PriorityInterval",
|
7491 | DynamicPriority = "DynamicPriority"
|
7492 | }
|
7493 | interface WatchOptions {
|
7494 | watchFile?: WatchFileKind | ts.WatchFileKind;
|
7495 | watchDirectory?: WatchDirectoryKind | ts.WatchDirectoryKind;
|
7496 | fallbackPolling?: PollingWatchKind | ts.PollingWatchKind;
|
7497 | synchronousWatchDirectory?: boolean;
|
7498 | [option: string]: CompilerOptionsValue | undefined;
|
7499 | }
|
7500 | /**
|
7501 | * Configure request; value of command field is "configure". Specifies
|
7502 | * host information, such as host type, tab size, and indent size.
|
7503 | */
|
7504 | interface ConfigureRequest extends Request {
|
7505 | command: CommandTypes.Configure;
|
7506 | arguments: ConfigureRequestArguments;
|
7507 | }
|
7508 | /**
|
7509 | * Response to "configure" request. This is just an acknowledgement, so
|
7510 | * no body field is required.
|
7511 | */
|
7512 | interface ConfigureResponse extends Response {
|
7513 | }
|
7514 | interface ConfigurePluginRequestArguments {
|
7515 | pluginName: string;
|
7516 | configuration: any;
|
7517 | }
|
7518 | interface ConfigurePluginRequest extends Request {
|
7519 | command: CommandTypes.ConfigurePlugin;
|
7520 | arguments: ConfigurePluginRequestArguments;
|
7521 | }
|
7522 | interface ConfigurePluginResponse extends Response {
|
7523 | }
|
7524 | interface SelectionRangeRequest extends FileRequest {
|
7525 | command: CommandTypes.SelectionRange;
|
7526 | arguments: SelectionRangeRequestArgs;
|
7527 | }
|
7528 | interface SelectionRangeRequestArgs extends FileRequestArgs {
|
7529 | locations: Location[];
|
7530 | }
|
7531 | interface SelectionRangeResponse extends Response {
|
7532 | body?: SelectionRange[];
|
7533 | }
|
7534 | interface SelectionRange {
|
7535 | textSpan: TextSpan;
|
7536 | parent?: SelectionRange;
|
7537 | }
|
7538 | interface ToggleLineCommentRequest extends FileRequest {
|
7539 | command: CommandTypes.ToggleLineComment;
|
7540 | arguments: FileRangeRequestArgs;
|
7541 | }
|
7542 | interface ToggleMultilineCommentRequest extends FileRequest {
|
7543 | command: CommandTypes.ToggleMultilineComment;
|
7544 | arguments: FileRangeRequestArgs;
|
7545 | }
|
7546 | interface CommentSelectionRequest extends FileRequest {
|
7547 | command: CommandTypes.CommentSelection;
|
7548 | arguments: FileRangeRequestArgs;
|
7549 | }
|
7550 | interface UncommentSelectionRequest extends FileRequest {
|
7551 | command: CommandTypes.UncommentSelection;
|
7552 | arguments: FileRangeRequestArgs;
|
7553 | }
|
7554 | /**
|
7555 | * Information found in an "open" request.
|
7556 | */
|
7557 | interface OpenRequestArgs extends FileRequestArgs {
|
7558 | /**
|
7559 | * Used when a version of the file content is known to be more up to date than the one on disk.
|
7560 | * Then the known content will be used upon opening instead of the disk copy
|
7561 | */
|
7562 | fileContent?: string;
|
7563 | /**
|
7564 | * Used to specify the script kind of the file explicitly. It could be one of the following:
|
7565 | * "TS", "JS", "TSX", "JSX"
|
7566 | */
|
7567 | scriptKindName?: ScriptKindName;
|
7568 | /**
|
7569 | * Used to limit the searching for project config file. If given the searching will stop at this
|
7570 | * root path; otherwise it will go all the way up to the dist root path.
|
7571 | */
|
7572 | projectRootPath?: string;
|
7573 | }
|
7574 | type ScriptKindName = "TS" | "JS" | "TSX" | "JSX";
|
7575 | /**
|
7576 | * Open request; value of command field is "open". Notify the
|
7577 | * server that the client has file open. The server will not
|
7578 | * monitor the filesystem for changes in this file and will assume
|
7579 | * that the client is updating the server (using the change and/or
|
7580 | * reload messages) when the file changes. Server does not currently
|
7581 | * send a response to an open request.
|
7582 | */
|
7583 | interface OpenRequest extends Request {
|
7584 | command: CommandTypes.Open;
|
7585 | arguments: OpenRequestArgs;
|
7586 | }
|
7587 | /**
|
7588 | * Request to open or update external project
|
7589 | */
|
7590 | interface OpenExternalProjectRequest extends Request {
|
7591 | command: CommandTypes.OpenExternalProject;
|
7592 | arguments: OpenExternalProjectArgs;
|
7593 | }
|
7594 | /**
|
7595 | * Arguments to OpenExternalProjectRequest request
|
7596 | */
|
7597 | type OpenExternalProjectArgs = ExternalProject;
|
7598 | /**
|
7599 | * Request to open multiple external projects
|
7600 | */
|
7601 | interface OpenExternalProjectsRequest extends Request {
|
7602 | command: CommandTypes.OpenExternalProjects;
|
7603 | arguments: OpenExternalProjectsArgs;
|
7604 | }
|
7605 | /**
|
7606 | * Arguments to OpenExternalProjectsRequest
|
7607 | */
|
7608 | interface OpenExternalProjectsArgs {
|
7609 | /**
|
7610 | * List of external projects to open or update
|
7611 | */
|
7612 | projects: ExternalProject[];
|
7613 | }
|
7614 | /**
|
7615 | * Response to OpenExternalProjectRequest request. This is just an acknowledgement, so
|
7616 | * no body field is required.
|
7617 | */
|
7618 | interface OpenExternalProjectResponse extends Response {
|
7619 | }
|
7620 | /**
|
7621 | * Response to OpenExternalProjectsRequest request. This is just an acknowledgement, so
|
7622 | * no body field is required.
|
7623 | */
|
7624 | interface OpenExternalProjectsResponse extends Response {
|
7625 | }
|
7626 | /**
|
7627 | * Request to close external project.
|
7628 | */
|
7629 | interface CloseExternalProjectRequest extends Request {
|
7630 | command: CommandTypes.CloseExternalProject;
|
7631 | arguments: CloseExternalProjectRequestArgs;
|
7632 | }
|
7633 | /**
|
7634 | * Arguments to CloseExternalProjectRequest request
|
7635 | */
|
7636 | interface CloseExternalProjectRequestArgs {
|
7637 | /**
|
7638 | * Name of the project to close
|
7639 | */
|
7640 | projectFileName: string;
|
7641 | }
|
7642 | /**
|
7643 | * Response to CloseExternalProjectRequest request. This is just an acknowledgement, so
|
7644 | * no body field is required.
|
7645 | */
|
7646 | interface CloseExternalProjectResponse extends Response {
|
7647 | }
|
7648 | /**
|
7649 | * Request to synchronize list of open files with the client
|
7650 | */
|
7651 | interface UpdateOpenRequest extends Request {
|
7652 | command: CommandTypes.UpdateOpen;
|
7653 | arguments: UpdateOpenRequestArgs;
|
7654 | }
|
7655 | /**
|
7656 | * Arguments to UpdateOpenRequest
|
7657 | */
|
7658 | interface UpdateOpenRequestArgs {
|
7659 | /**
|
7660 | * List of newly open files
|
7661 | */
|
7662 | openFiles?: OpenRequestArgs[];
|
7663 | /**
|
7664 | * List of open files files that were changes
|
7665 | */
|
7666 | changedFiles?: FileCodeEdits[];
|
7667 | /**
|
7668 | * List of files that were closed
|
7669 | */
|
7670 | closedFiles?: string[];
|
7671 | }
|
7672 | /**
|
7673 | * Request to set compiler options for inferred projects.
|
7674 | * External projects are opened / closed explicitly.
|
7675 | * Configured projects are opened when user opens loose file that has 'tsconfig.json' or 'jsconfig.json' anywhere in one of containing folders.
|
7676 | * This configuration file will be used to obtain a list of files and configuration settings for the project.
|
7677 | * Inferred projects are created when user opens a loose file that is not the part of external project
|
7678 | * or configured project and will contain only open file and transitive closure of referenced files if 'useOneInferredProject' is false,
|
7679 | * or all open loose files and its transitive closure of referenced files if 'useOneInferredProject' is true.
|
7680 | */
|
7681 | interface SetCompilerOptionsForInferredProjectsRequest extends Request {
|
7682 | command: CommandTypes.CompilerOptionsForInferredProjects;
|
7683 | arguments: SetCompilerOptionsForInferredProjectsArgs;
|
7684 | }
|
7685 | /**
|
7686 | * Argument for SetCompilerOptionsForInferredProjectsRequest request.
|
7687 | */
|
7688 | interface SetCompilerOptionsForInferredProjectsArgs {
|
7689 | /**
|
7690 | * Compiler options to be used with inferred projects.
|
7691 | */
|
7692 | options: ExternalProjectCompilerOptions;
|
7693 | /**
|
7694 | * Specifies the project root path used to scope compiler options.
|
7695 | * It is an error to provide this property if the server has not been started with
|
7696 | * `useInferredProjectPerProjectRoot` enabled.
|
7697 | */
|
7698 | projectRootPath?: string;
|
7699 | }
|
7700 | /**
|
7701 | * Response to SetCompilerOptionsForInferredProjectsResponse request. This is just an acknowledgement, so
|
7702 | * no body field is required.
|
7703 | */
|
7704 | interface SetCompilerOptionsForInferredProjectsResponse extends Response {
|
7705 | }
|
7706 | /**
|
7707 | * Exit request; value of command field is "exit". Ask the server process
|
7708 | * to exit.
|
7709 | */
|
7710 | interface ExitRequest extends Request {
|
7711 | command: CommandTypes.Exit;
|
7712 | }
|
7713 | /**
|
7714 | * Close request; value of command field is "close". Notify the
|
7715 | * server that the client has closed a previously open file. If
|
7716 | * file is still referenced by open files, the server will resume
|
7717 | * monitoring the filesystem for changes to file. Server does not
|
7718 | * currently send a response to a close request.
|
7719 | */
|
7720 | interface CloseRequest extends FileRequest {
|
7721 | command: CommandTypes.Close;
|
7722 | }
|
7723 | /**
|
7724 | * Request to obtain the list of files that should be regenerated if target file is recompiled.
|
7725 | * NOTE: this us query-only operation and does not generate any output on disk.
|
7726 | */
|
7727 | interface CompileOnSaveAffectedFileListRequest extends FileRequest {
|
7728 | command: CommandTypes.CompileOnSaveAffectedFileList;
|
7729 | }
|
7730 | /**
|
7731 | * Contains a list of files that should be regenerated in a project
|
7732 | */
|
7733 | interface CompileOnSaveAffectedFileListSingleProject {
|
7734 | /**
|
7735 | * Project name
|
7736 | */
|
7737 | projectFileName: string;
|
7738 | /**
|
7739 | * List of files names that should be recompiled
|
7740 | */
|
7741 | fileNames: string[];
|
7742 | /**
|
7743 | * true if project uses outFile or out compiler option
|
7744 | */
|
7745 | projectUsesOutFile: boolean;
|
7746 | }
|
7747 | /**
|
7748 | * Response for CompileOnSaveAffectedFileListRequest request;
|
7749 | */
|
7750 | interface CompileOnSaveAffectedFileListResponse extends Response {
|
7751 | body: CompileOnSaveAffectedFileListSingleProject[];
|
7752 | }
|
7753 | /**
|
7754 | * Request to recompile the file. All generated outputs (.js, .d.ts or .js.map files) is written on disk.
|
7755 | */
|
7756 | interface CompileOnSaveEmitFileRequest extends FileRequest {
|
7757 | command: CommandTypes.CompileOnSaveEmitFile;
|
7758 | arguments: CompileOnSaveEmitFileRequestArgs;
|
7759 | }
|
7760 | /**
|
7761 | * Arguments for CompileOnSaveEmitFileRequest
|
7762 | */
|
7763 | interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs {
|
7764 | /**
|
7765 | * if true - then file should be recompiled even if it does not have any changes.
|
7766 | */
|
7767 | forced?: boolean;
|
7768 | includeLinePosition?: boolean;
|
7769 | /** if true - return response as object with emitSkipped and diagnostics */
|
7770 | richResponse?: boolean;
|
7771 | }
|
7772 | interface CompileOnSaveEmitFileResponse extends Response {
|
7773 | body: boolean | EmitResult;
|
7774 | }
|
7775 | interface EmitResult {
|
7776 | emitSkipped: boolean;
|
7777 | diagnostics: Diagnostic[] | DiagnosticWithLinePosition[];
|
7778 | }
|
7779 | /**
|
7780 | * Quickinfo request; value of command field is
|
7781 | * "quickinfo". Return response giving a quick type and
|
7782 | * documentation string for the symbol found in file at location
|
7783 | * line, col.
|
7784 | */
|
7785 | interface QuickInfoRequest extends FileLocationRequest {
|
7786 | command: CommandTypes.Quickinfo;
|
7787 | }
|
7788 | /**
|
7789 | * Body of QuickInfoResponse.
|
7790 | */
|
7791 | interface QuickInfoResponseBody {
|
7792 | /**
|
7793 | * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
|
7794 | */
|
7795 | kind: ScriptElementKind;
|
7796 | /**
|
7797 | * Optional modifiers for the kind (such as 'public').
|
7798 | */
|
7799 | kindModifiers: string;
|
7800 | /**
|
7801 | * Starting file location of symbol.
|
7802 | */
|
7803 | start: Location;
|
7804 | /**
|
7805 | * One past last character of symbol.
|
7806 | */
|
7807 | end: Location;
|
7808 | /**
|
7809 | * Type and kind of symbol.
|
7810 | */
|
7811 | displayString: string;
|
7812 | /**
|
7813 | * Documentation associated with symbol.
|
7814 | */
|
7815 | documentation: string;
|
7816 | /**
|
7817 | * JSDoc tags associated with symbol.
|
7818 | */
|
7819 | tags: JSDocTagInfo[];
|
7820 | }
|
7821 | /**
|
7822 | * Quickinfo response message.
|
7823 | */
|
7824 | interface QuickInfoResponse extends Response {
|
7825 | body?: QuickInfoResponseBody;
|
7826 | }
|
7827 | /**
|
7828 | * Arguments for format messages.
|
7829 | */
|
7830 | interface FormatRequestArgs extends FileLocationRequestArgs {
|
7831 | /**
|
7832 | * Last line of range for which to format text in file.
|
7833 | */
|
7834 | endLine: number;
|
7835 | /**
|
7836 | * Character offset on last line of range for which to format text in file.
|
7837 | */
|
7838 | endOffset: number;
|
7839 | /**
|
7840 | * Format options to be used.
|
7841 | */
|
7842 | options?: FormatCodeSettings;
|
7843 | }
|
7844 | /**
|
7845 | * Format request; value of command field is "format". Return
|
7846 | * response giving zero or more edit instructions. The edit
|
7847 | * instructions will be sorted in file order. Applying the edit
|
7848 | * instructions in reverse to file will result in correctly
|
7849 | * reformatted text.
|
7850 | */
|
7851 | interface FormatRequest extends FileLocationRequest {
|
7852 | command: CommandTypes.Format;
|
7853 | arguments: FormatRequestArgs;
|
7854 | }
|
7855 | /**
|
7856 | * Object found in response messages defining an editing
|
7857 | * instruction for a span of text in source code. The effect of
|
7858 | * this instruction is to replace the text starting at start and
|
7859 | * ending one character before end with newText. For an insertion,
|
7860 | * the text span is empty. For a deletion, newText is empty.
|
7861 | */
|
7862 | interface CodeEdit {
|
7863 | /**
|
7864 | * First character of the text span to edit.
|
7865 | */
|
7866 | start: Location;
|
7867 | /**
|
7868 | * One character past last character of the text span to edit.
|
7869 | */
|
7870 | end: Location;
|
7871 | /**
|
7872 | * Replace the span defined above with this string (may be
|
7873 | * the empty string).
|
7874 | */
|
7875 | newText: string;
|
7876 | }
|
7877 | interface FileCodeEdits {
|
7878 | fileName: string;
|
7879 | textChanges: CodeEdit[];
|
7880 | }
|
7881 | interface CodeFixResponse extends Response {
|
7882 | /** The code actions that are available */
|
7883 | body?: CodeFixAction[];
|
7884 | }
|
7885 | interface CodeAction {
|
7886 | /** Description of the code action to display in the UI of the editor */
|
7887 | description: string;
|
7888 | /** Text changes to apply to each file as part of the code action */
|
7889 | changes: FileCodeEdits[];
|
7890 | /** A command is an opaque object that should be passed to `ApplyCodeActionCommandRequestArgs` without modification. */
|
7891 | commands?: {}[];
|
7892 | }
|
7893 | interface CombinedCodeActions {
|
7894 | changes: readonly FileCodeEdits[];
|
7895 | commands?: readonly {}[];
|
7896 | }
|
7897 | interface CodeFixAction extends CodeAction {
|
7898 | /** Short name to identify the fix, for use by telemetry. */
|
7899 | fixName: string;
|
7900 | /**
|
7901 | * If present, one may call 'getCombinedCodeFix' with this fixId.
|
7902 | * This may be omitted to indicate that the code fix can't be applied in a group.
|
7903 | */
|
7904 | fixId?: {};
|
7905 | /** Should be present if and only if 'fixId' is. */
|
7906 | fixAllDescription?: string;
|
7907 | }
|
7908 | /**
|
7909 | * Format and format on key response message.
|
7910 | */
|
7911 | interface FormatResponse extends Response {
|
7912 | body?: CodeEdit[];
|
7913 | }
|
7914 | /**
|
7915 | * Arguments for format on key messages.
|
7916 | */
|
7917 | interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
|
7918 | /**
|
7919 | * Key pressed (';', '\n', or '}').
|
7920 | */
|
7921 | key: string;
|
7922 | options?: FormatCodeSettings;
|
7923 | }
|
7924 | /**
|
7925 | * Format on key request; value of command field is
|
7926 | * "formatonkey". Given file location and key typed (as string),
|
7927 | * return response giving zero or more edit instructions. The
|
7928 | * edit instructions will be sorted in file order. Applying the
|
7929 | * edit instructions in reverse to file will result in correctly
|
7930 | * reformatted text.
|
7931 | */
|
7932 | interface FormatOnKeyRequest extends FileLocationRequest {
|
7933 | command: CommandTypes.Formatonkey;
|
7934 | arguments: FormatOnKeyRequestArgs;
|
7935 | }
|
7936 | type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#";
|
7937 | /**
|
7938 | * Arguments for completions messages.
|
7939 | */
|
7940 | interface CompletionsRequestArgs extends FileLocationRequestArgs {
|
7941 | /**
|
7942 | * Optional prefix to apply to possible completions.
|
7943 | */
|
7944 | prefix?: string;
|
7945 | /**
|
7946 | * Character that was responsible for triggering completion.
|
7947 | * Should be `undefined` if a user manually requested completion.
|
7948 | */
|
7949 | triggerCharacter?: CompletionsTriggerCharacter;
|
7950 | /**
|
7951 | * @deprecated Use UserPreferences.includeCompletionsForModuleExports
|
7952 | */
|
7953 | includeExternalModuleExports?: boolean;
|
7954 | /**
|
7955 | * @deprecated Use UserPreferences.includeCompletionsWithInsertText
|
7956 | */
|
7957 | includeInsertTextCompletions?: boolean;
|
7958 | }
|
7959 | /**
|
7960 | * Completions request; value of command field is "completions".
|
7961 | * Given a file location (file, line, col) and a prefix (which may
|
7962 | * be the empty string), return the possible completions that
|
7963 | * begin with prefix.
|
7964 | */
|
7965 | interface CompletionsRequest extends FileLocationRequest {
|
7966 | command: CommandTypes.Completions | CommandTypes.CompletionInfo;
|
7967 | arguments: CompletionsRequestArgs;
|
7968 | }
|
7969 | /**
|
7970 | * Arguments for completion details request.
|
7971 | */
|
7972 | interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
|
7973 | /**
|
7974 | * Names of one or more entries for which to obtain details.
|
7975 | */
|
7976 | entryNames: (string | CompletionEntryIdentifier)[];
|
7977 | }
|
7978 | interface CompletionEntryIdentifier {
|
7979 | name: string;
|
7980 | source?: string;
|
7981 | }
|
7982 | /**
|
7983 | * Completion entry details request; value of command field is
|
7984 | * "completionEntryDetails". Given a file location (file, line,
|
7985 | * col) and an array of completion entry names return more
|
7986 | * detailed information for each completion entry.
|
7987 | */
|
7988 | interface CompletionDetailsRequest extends FileLocationRequest {
|
7989 | command: CommandTypes.CompletionDetails;
|
7990 | arguments: CompletionDetailsRequestArgs;
|
7991 | }
|
7992 | /**
|
7993 | * Part of a symbol description.
|
7994 | */
|
7995 | interface SymbolDisplayPart {
|
7996 | /**
|
7997 | * Text of an item describing the symbol.
|
7998 | */
|
7999 | text: string;
|
8000 | /**
|
8001 | * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
|
8002 | */
|
8003 | kind: string;
|
8004 | }
|
8005 | /**
|
8006 | * An item found in a completion response.
|
8007 | */
|
8008 | interface CompletionEntry {
|
8009 | /**
|
8010 | * The symbol's name.
|
8011 | */
|
8012 | name: string;
|
8013 | /**
|
8014 | * The symbol's kind (such as 'className' or 'parameterName').
|
8015 | */
|
8016 | kind: ScriptElementKind;
|
8017 | /**
|
8018 | * Optional modifiers for the kind (such as 'public').
|
8019 | */
|
8020 | kindModifiers?: string;
|
8021 | /**
|
8022 | * A string that is used for comparing completion items so that they can be ordered. This
|
8023 | * is often the same as the name but may be different in certain circumstances.
|
8024 | */
|
8025 | sortText: string;
|
8026 | /**
|
8027 | * Text to insert instead of `name`.
|
8028 | * This is used to support bracketed completions; If `name` might be "a-b" but `insertText` would be `["a-b"]`,
|
8029 | * coupled with `replacementSpan` to replace a dotted access with a bracket access.
|
8030 | */
|
8031 | insertText?: string;
|
8032 | /**
|
8033 | * An optional span that indicates the text to be replaced by this completion item.
|
8034 | * If present, this span should be used instead of the default one.
|
8035 | * It will be set if the required span differs from the one generated by the default replacement behavior.
|
8036 | */
|
8037 | replacementSpan?: TextSpan;
|
8038 | /**
|
8039 | * Indicates whether commiting this completion entry will require additional code actions to be
|
8040 | * made to avoid errors. The CompletionEntryDetails will have these actions.
|
8041 | */
|
8042 | hasAction?: true;
|
8043 | /**
|
8044 | * Identifier (not necessarily human-readable) identifying where this completion came from.
|
8045 | */
|
8046 | source?: string;
|
8047 | /**
|
8048 | * If true, this completion should be highlighted as recommended. There will only be one of these.
|
8049 | * 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.
|
8050 | * Then either that enum/class or a namespace containing it will be the recommended symbol.
|
8051 | */
|
8052 | isRecommended?: true;
|
8053 | /**
|
8054 | * If true, this completion was generated from traversing the name table of an unchecked JS file,
|
8055 | * and therefore may not be accurate.
|
8056 | */
|
8057 | isFromUncheckedFile?: true;
|
8058 | /**
|
8059 | * If true, this completion was for an auto-import of a module not yet in the program, but listed
|
8060 | * in the project package.json.
|
8061 | */
|
8062 | isPackageJsonImport?: true;
|
8063 | }
|
8064 | /**
|
8065 | * Additional completion entry details, available on demand
|
8066 | */
|
8067 | interface CompletionEntryDetails {
|
8068 | /**
|
8069 | * The symbol's name.
|
8070 | */
|
8071 | name: string;
|
8072 | /**
|
8073 | * The symbol's kind (such as 'className' or 'parameterName').
|
8074 | */
|
8075 | kind: ScriptElementKind;
|
8076 | /**
|
8077 | * Optional modifiers for the kind (such as 'public').
|
8078 | */
|
8079 | kindModifiers: string;
|
8080 | /**
|
8081 | * Display parts of the symbol (similar to quick info).
|
8082 | */
|
8083 | displayParts: SymbolDisplayPart[];
|
8084 | /**
|
8085 | * Documentation strings for the symbol.
|
8086 | */
|
8087 | documentation?: SymbolDisplayPart[];
|
8088 | /**
|
8089 | * JSDoc tags for the symbol.
|
8090 | */
|
8091 | tags?: JSDocTagInfo[];
|
8092 | /**
|
8093 | * The associated code actions for this entry
|
8094 | */
|
8095 | codeActions?: CodeAction[];
|
8096 | /**
|
8097 | * Human-readable description of the `source` from the CompletionEntry.
|
8098 | */
|
8099 | source?: SymbolDisplayPart[];
|
8100 | }
|
8101 | /** @deprecated Prefer CompletionInfoResponse, which supports several top-level fields in addition to the array of entries. */
|
8102 | interface CompletionsResponse extends Response {
|
8103 | body?: CompletionEntry[];
|
8104 | }
|
8105 | interface CompletionInfoResponse extends Response {
|
8106 | body?: CompletionInfo;
|
8107 | }
|
8108 | interface CompletionInfo {
|
8109 | readonly isGlobalCompletion: boolean;
|
8110 | readonly isMemberCompletion: boolean;
|
8111 | readonly isNewIdentifierLocation: boolean;
|
8112 | readonly entries: readonly CompletionEntry[];
|
8113 | }
|
8114 | interface CompletionDetailsResponse extends Response {
|
8115 | body?: CompletionEntryDetails[];
|
8116 | }
|
8117 | /**
|
8118 | * Signature help information for a single parameter
|
8119 | */
|
8120 | interface SignatureHelpParameter {
|
8121 | /**
|
8122 | * The parameter's name
|
8123 | */
|
8124 | name: string;
|
8125 | /**
|
8126 | * Documentation of the parameter.
|
8127 | */
|
8128 | documentation: SymbolDisplayPart[];
|
8129 | /**
|
8130 | * Display parts of the parameter.
|
8131 | */
|
8132 | displayParts: SymbolDisplayPart[];
|
8133 | /**
|
8134 | * Whether the parameter is optional or not.
|
8135 | */
|
8136 | isOptional: boolean;
|
8137 | }
|
8138 | /**
|
8139 | * Represents a single signature to show in signature help.
|
8140 | */
|
8141 | interface SignatureHelpItem {
|
8142 | /**
|
8143 | * Whether the signature accepts a variable number of arguments.
|
8144 | */
|
8145 | isVariadic: boolean;
|
8146 | /**
|
8147 | * The prefix display parts.
|
8148 | */
|
8149 | prefixDisplayParts: SymbolDisplayPart[];
|
8150 | /**
|
8151 | * The suffix display parts.
|
8152 | */
|
8153 | suffixDisplayParts: SymbolDisplayPart[];
|
8154 | /**
|
8155 | * The separator display parts.
|
8156 | */
|
8157 | separatorDisplayParts: SymbolDisplayPart[];
|
8158 | /**
|
8159 | * The signature helps items for the parameters.
|
8160 | */
|
8161 | parameters: SignatureHelpParameter[];
|
8162 | /**
|
8163 | * The signature's documentation
|
8164 | */
|
8165 | documentation: SymbolDisplayPart[];
|
8166 | /**
|
8167 | * The signature's JSDoc tags
|
8168 | */
|
8169 | tags: JSDocTagInfo[];
|
8170 | }
|
8171 | /**
|
8172 | * Signature help items found in the response of a signature help request.
|
8173 | */
|
8174 | interface SignatureHelpItems {
|
8175 | /**
|
8176 | * The signature help items.
|
8177 | */
|
8178 | items: SignatureHelpItem[];
|
8179 | /**
|
8180 | * The span for which signature help should appear on a signature
|
8181 | */
|
8182 | applicableSpan: TextSpan;
|
8183 | /**
|
8184 | * The item selected in the set of available help items.
|
8185 | */
|
8186 | selectedItemIndex: number;
|
8187 | /**
|
8188 | * The argument selected in the set of parameters.
|
8189 | */
|
8190 | argumentIndex: number;
|
8191 | /**
|
8192 | * The argument count
|
8193 | */
|
8194 | argumentCount: number;
|
8195 | }
|
8196 | type SignatureHelpTriggerCharacter = "," | "(" | "<";
|
8197 | type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
|
8198 | /**
|
8199 | * Arguments of a signature help request.
|
8200 | */
|
8201 | interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
|
8202 | /**
|
8203 | * Reason why signature help was invoked.
|
8204 | * See each individual possible
|
8205 | */
|
8206 | triggerReason?: SignatureHelpTriggerReason;
|
8207 | }
|
8208 | type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason;
|
8209 | /**
|
8210 | * Signals that the user manually requested signature help.
|
8211 | * The language service will unconditionally attempt to provide a result.
|
8212 | */
|
8213 | interface SignatureHelpInvokedReason {
|
8214 | kind: "invoked";
|
8215 | triggerCharacter?: undefined;
|
8216 | }
|
8217 | /**
|
8218 | * Signals that the signature help request came from a user typing a character.
|
8219 | * Depending on the character and the syntactic context, the request may or may not be served a result.
|
8220 | */
|
8221 | interface SignatureHelpCharacterTypedReason {
|
8222 | kind: "characterTyped";
|
8223 | /**
|
8224 | * Character that was responsible for triggering signature help.
|
8225 | */
|
8226 | triggerCharacter: SignatureHelpTriggerCharacter;
|
8227 | }
|
8228 | /**
|
8229 | * Signals that this signature help request came from typing a character or moving the cursor.
|
8230 | * This should only occur if a signature help session was already active and the editor needs to see if it should adjust.
|
8231 | * The language service will unconditionally attempt to provide a result.
|
8232 | * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move.
|
8233 | */
|
8234 | interface SignatureHelpRetriggeredReason {
|
8235 | kind: "retrigger";
|
8236 | /**
|
8237 | * Character that was responsible for triggering signature help.
|
8238 | */
|
8239 | triggerCharacter?: SignatureHelpRetriggerCharacter;
|
8240 | }
|
8241 | /**
|
8242 | * Signature help request; value of command field is "signatureHelp".
|
8243 | * Given a file location (file, line, col), return the signature
|
8244 | * help.
|
8245 | */
|
8246 | interface SignatureHelpRequest extends FileLocationRequest {
|
8247 | command: CommandTypes.SignatureHelp;
|
8248 | arguments: SignatureHelpRequestArgs;
|
8249 | }
|
8250 | /**
|
8251 | * Response object for a SignatureHelpRequest.
|
8252 | */
|
8253 | interface SignatureHelpResponse extends Response {
|
8254 | body?: SignatureHelpItems;
|
8255 | }
|
8256 | /**
|
8257 | * Synchronous request for semantic diagnostics of one file.
|
8258 | */
|
8259 | interface SemanticDiagnosticsSyncRequest extends FileRequest {
|
8260 | command: CommandTypes.SemanticDiagnosticsSync;
|
8261 | arguments: SemanticDiagnosticsSyncRequestArgs;
|
8262 | }
|
8263 | interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs {
|
8264 | includeLinePosition?: boolean;
|
8265 | }
|
8266 | /**
|
8267 | * Response object for synchronous sematic diagnostics request.
|
8268 | */
|
8269 | interface SemanticDiagnosticsSyncResponse extends Response {
|
8270 | body?: Diagnostic[] | DiagnosticWithLinePosition[];
|
8271 | }
|
8272 | interface SuggestionDiagnosticsSyncRequest extends FileRequest {
|
8273 | command: CommandTypes.SuggestionDiagnosticsSync;
|
8274 | arguments: SuggestionDiagnosticsSyncRequestArgs;
|
8275 | }
|
8276 | type SuggestionDiagnosticsSyncRequestArgs = SemanticDiagnosticsSyncRequestArgs;
|
8277 | type SuggestionDiagnosticsSyncResponse = SemanticDiagnosticsSyncResponse;
|
8278 | /**
|
8279 | * Synchronous request for syntactic diagnostics of one file.
|
8280 | */
|
8281 | interface SyntacticDiagnosticsSyncRequest extends FileRequest {
|
8282 | command: CommandTypes.SyntacticDiagnosticsSync;
|
8283 | arguments: SyntacticDiagnosticsSyncRequestArgs;
|
8284 | }
|
8285 | interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs {
|
8286 | includeLinePosition?: boolean;
|
8287 | }
|
8288 | /**
|
8289 | * Response object for synchronous syntactic diagnostics request.
|
8290 | */
|
8291 | interface SyntacticDiagnosticsSyncResponse extends Response {
|
8292 | body?: Diagnostic[] | DiagnosticWithLinePosition[];
|
8293 | }
|
8294 | /**
|
8295 | * Arguments for GeterrForProject request.
|
8296 | */
|
8297 | interface GeterrForProjectRequestArgs {
|
8298 | /**
|
8299 | * the file requesting project error list
|
8300 | */
|
8301 | file: string;
|
8302 | /**
|
8303 | * Delay in milliseconds to wait before starting to compute
|
8304 | * errors for the files in the file list
|
8305 | */
|
8306 | delay: number;
|
8307 | }
|
8308 | /**
|
8309 | * GeterrForProjectRequest request; value of command field is
|
8310 | * "geterrForProject". It works similarly with 'Geterr', only
|
8311 | * it request for every file in this project.
|
8312 | */
|
8313 | interface GeterrForProjectRequest extends Request {
|
8314 | command: CommandTypes.GeterrForProject;
|
8315 | arguments: GeterrForProjectRequestArgs;
|
8316 | }
|
8317 | /**
|
8318 | * Arguments for geterr messages.
|
8319 | */
|
8320 | interface GeterrRequestArgs {
|
8321 | /**
|
8322 | * List of file names for which to compute compiler errors.
|
8323 | * The files will be checked in list order.
|
8324 | */
|
8325 | files: string[];
|
8326 | /**
|
8327 | * Delay in milliseconds to wait before starting to compute
|
8328 | * errors for the files in the file list
|
8329 | */
|
8330 | delay: number;
|
8331 | }
|
8332 | /**
|
8333 | * Geterr request; value of command field is "geterr". Wait for
|
8334 | * delay milliseconds and then, if during the wait no change or
|
8335 | * reload messages have arrived for the first file in the files
|
8336 | * list, get the syntactic errors for the file, field requests,
|
8337 | * and then get the semantic errors for the file. Repeat with a
|
8338 | * smaller delay for each subsequent file on the files list. Best
|
8339 | * practice for an editor is to send a file list containing each
|
8340 | * file that is currently visible, in most-recently-used order.
|
8341 | */
|
8342 | interface GeterrRequest extends Request {
|
8343 | command: CommandTypes.Geterr;
|
8344 | arguments: GeterrRequestArgs;
|
8345 | }
|
8346 | type RequestCompletedEventName = "requestCompleted";
|
8347 | /**
|
8348 | * Event that is sent when server have finished processing request with specified id.
|
8349 | */
|
8350 | interface RequestCompletedEvent extends Event {
|
8351 | event: RequestCompletedEventName;
|
8352 | body: RequestCompletedEventBody;
|
8353 | }
|
8354 | interface RequestCompletedEventBody {
|
8355 | request_seq: number;
|
8356 | }
|
8357 | /**
|
8358 | * Item of diagnostic information found in a DiagnosticEvent message.
|
8359 | */
|
8360 | interface Diagnostic {
|
8361 | /**
|
8362 | * Starting file location at which text applies.
|
8363 | */
|
8364 | start: Location;
|
8365 | /**
|
8366 | * The last file location at which the text applies.
|
8367 | */
|
8368 | end: Location;
|
8369 | /**
|
8370 | * Text of diagnostic message.
|
8371 | */
|
8372 | text: string;
|
8373 | /**
|
8374 | * The category of the diagnostic message, e.g. "error", "warning", or "suggestion".
|
8375 | */
|
8376 | category: string;
|
8377 | reportsUnnecessary?: {};
|
8378 | reportsDeprecated?: {};
|
8379 | /**
|
8380 | * Any related spans the diagnostic may have, such as other locations relevant to an error, such as declarartion sites
|
8381 | */
|
8382 | relatedInformation?: DiagnosticRelatedInformation[];
|
8383 | /**
|
8384 | * The error code of the diagnostic message.
|
8385 | */
|
8386 | code?: number;
|
8387 | /**
|
8388 | * The name of the plugin reporting the message.
|
8389 | */
|
8390 | source?: string;
|
8391 | }
|
8392 | interface DiagnosticWithFileName extends Diagnostic {
|
8393 | /**
|
8394 | * Name of the file the diagnostic is in
|
8395 | */
|
8396 | fileName: string;
|
8397 | }
|
8398 | /**
|
8399 | * Represents additional spans returned with a diagnostic which are relevant to it
|
8400 | */
|
8401 | interface DiagnosticRelatedInformation {
|
8402 | /**
|
8403 | * The category of the related information message, e.g. "error", "warning", or "suggestion".
|
8404 | */
|
8405 | category: string;
|
8406 | /**
|
8407 | * The code used ot identify the related information
|
8408 | */
|
8409 | code: number;
|
8410 | /**
|
8411 | * Text of related or additional information.
|
8412 | */
|
8413 | message: string;
|
8414 | /**
|
8415 | * Associated location
|
8416 | */
|
8417 | span?: FileSpan;
|
8418 | }
|
8419 | interface DiagnosticEventBody {
|
8420 | /**
|
8421 | * The file for which diagnostic information is reported.
|
8422 | */
|
8423 | file: string;
|
8424 | /**
|
8425 | * An array of diagnostic information items.
|
8426 | */
|
8427 | diagnostics: Diagnostic[];
|
8428 | }
|
8429 | type DiagnosticEventKind = "semanticDiag" | "syntaxDiag" | "suggestionDiag";
|
8430 | /**
|
8431 | * Event message for DiagnosticEventKind event types.
|
8432 | * These events provide syntactic and semantic errors for a file.
|
8433 | */
|
8434 | interface DiagnosticEvent extends Event {
|
8435 | body?: DiagnosticEventBody;
|
8436 | event: DiagnosticEventKind;
|
8437 | }
|
8438 | interface ConfigFileDiagnosticEventBody {
|
8439 | /**
|
8440 | * The file which trigged the searching and error-checking of the config file
|
8441 | */
|
8442 | triggerFile: string;
|
8443 | /**
|
8444 | * The name of the found config file.
|
8445 | */
|
8446 | configFile: string;
|
8447 | /**
|
8448 | * An arry of diagnostic information items for the found config file.
|
8449 | */
|
8450 | diagnostics: DiagnosticWithFileName[];
|
8451 | }
|
8452 | /**
|
8453 | * Event message for "configFileDiag" event type.
|
8454 | * This event provides errors for a found config file.
|
8455 | */
|
8456 | interface ConfigFileDiagnosticEvent extends Event {
|
8457 | body?: ConfigFileDiagnosticEventBody;
|
8458 | event: "configFileDiag";
|
8459 | }
|
8460 | type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
|
8461 | interface ProjectLanguageServiceStateEvent extends Event {
|
8462 | event: ProjectLanguageServiceStateEventName;
|
8463 | body?: ProjectLanguageServiceStateEventBody;
|
8464 | }
|
8465 | interface ProjectLanguageServiceStateEventBody {
|
8466 | /**
|
8467 | * Project name that has changes in the state of language service.
|
8468 | * For configured projects this will be the config file path.
|
8469 | * For external projects this will be the name of the projects specified when project was open.
|
8470 | * For inferred projects this event is not raised.
|
8471 | */
|
8472 | projectName: string;
|
8473 | /**
|
8474 | * True if language service state switched from disabled to enabled
|
8475 | * and false otherwise.
|
8476 | */
|
8477 | languageServiceEnabled: boolean;
|
8478 | }
|
8479 | type ProjectsUpdatedInBackgroundEventName = "projectsUpdatedInBackground";
|
8480 | interface ProjectsUpdatedInBackgroundEvent extends Event {
|
8481 | event: ProjectsUpdatedInBackgroundEventName;
|
8482 | body: ProjectsUpdatedInBackgroundEventBody;
|
8483 | }
|
8484 | interface ProjectsUpdatedInBackgroundEventBody {
|
8485 | /**
|
8486 | * Current set of open files
|
8487 | */
|
8488 | openFiles: string[];
|
8489 | }
|
8490 | type ProjectLoadingStartEventName = "projectLoadingStart";
|
8491 | interface ProjectLoadingStartEvent extends Event {
|
8492 | event: ProjectLoadingStartEventName;
|
8493 | body: ProjectLoadingStartEventBody;
|
8494 | }
|
8495 | interface ProjectLoadingStartEventBody {
|
8496 | /** name of the project */
|
8497 | projectName: string;
|
8498 | /** reason for loading */
|
8499 | reason: string;
|
8500 | }
|
8501 | type ProjectLoadingFinishEventName = "projectLoadingFinish";
|
8502 | interface ProjectLoadingFinishEvent extends Event {
|
8503 | event: ProjectLoadingFinishEventName;
|
8504 | body: ProjectLoadingFinishEventBody;
|
8505 | }
|
8506 | interface ProjectLoadingFinishEventBody {
|
8507 | /** name of the project */
|
8508 | projectName: string;
|
8509 | }
|
8510 | type SurveyReadyEventName = "surveyReady";
|
8511 | interface SurveyReadyEvent extends Event {
|
8512 | event: SurveyReadyEventName;
|
8513 | body: SurveyReadyEventBody;
|
8514 | }
|
8515 | interface SurveyReadyEventBody {
|
8516 | /** Name of the survey. This is an internal machine- and programmer-friendly name */
|
8517 | surveyId: string;
|
8518 | }
|
8519 | type LargeFileReferencedEventName = "largeFileReferenced";
|
8520 | interface LargeFileReferencedEvent extends Event {
|
8521 | event: LargeFileReferencedEventName;
|
8522 | body: LargeFileReferencedEventBody;
|
8523 | }
|
8524 | interface LargeFileReferencedEventBody {
|
8525 | /**
|
8526 | * name of the large file being loaded
|
8527 | */
|
8528 | file: string;
|
8529 | /**
|
8530 | * size of the file
|
8531 | */
|
8532 | fileSize: number;
|
8533 | /**
|
8534 | * max file size allowed on the server
|
8535 | */
|
8536 | maxFileSize: number;
|
8537 | }
|
8538 | /**
|
8539 | * Arguments for reload request.
|
8540 | */
|
8541 | interface ReloadRequestArgs extends FileRequestArgs {
|
8542 | /**
|
8543 | * Name of temporary file from which to reload file
|
8544 | * contents. May be same as file.
|
8545 | */
|
8546 | tmpfile: string;
|
8547 | }
|
8548 | /**
|
8549 | * Reload request message; value of command field is "reload".
|
8550 | * Reload contents of file with name given by the 'file' argument
|
8551 | * from temporary file with name given by the 'tmpfile' argument.
|
8552 | * The two names can be identical.
|
8553 | */
|
8554 | interface ReloadRequest extends FileRequest {
|
8555 | command: CommandTypes.Reload;
|
8556 | arguments: ReloadRequestArgs;
|
8557 | }
|
8558 | /**
|
8559 | * Response to "reload" request. This is just an acknowledgement, so
|
8560 | * no body field is required.
|
8561 | */
|
8562 | interface ReloadResponse extends Response {
|
8563 | }
|
8564 | /**
|
8565 | * Arguments for saveto request.
|
8566 | */
|
8567 | interface SavetoRequestArgs extends FileRequestArgs {
|
8568 | /**
|
8569 | * Name of temporary file into which to save server's view of
|
8570 | * file contents.
|
8571 | */
|
8572 | tmpfile: string;
|
8573 | }
|
8574 | /**
|
8575 | * Saveto request message; value of command field is "saveto".
|
8576 | * For debugging purposes, save to a temporaryfile (named by
|
8577 | * argument 'tmpfile') the contents of file named by argument
|
8578 | * 'file'. The server does not currently send a response to a
|
8579 | * "saveto" request.
|
8580 | */
|
8581 | interface SavetoRequest extends FileRequest {
|
8582 | command: CommandTypes.Saveto;
|
8583 | arguments: SavetoRequestArgs;
|
8584 | }
|
8585 | /**
|
8586 | * Arguments for navto request message.
|
8587 | */
|
8588 | interface NavtoRequestArgs {
|
8589 | /**
|
8590 | * Search term to navigate to from current location; term can
|
8591 | * be '.*' or an identifier prefix.
|
8592 | */
|
8593 | searchValue: string;
|
8594 | /**
|
8595 | * Optional limit on the number of items to return.
|
8596 | */
|
8597 | maxResultCount?: number;
|
8598 | /**
|
8599 | * The file for the request (absolute pathname required).
|
8600 | */
|
8601 | file?: string;
|
8602 | /**
|
8603 | * Optional flag to indicate we want results for just the current file
|
8604 | * or the entire project.
|
8605 | */
|
8606 | currentFileOnly?: boolean;
|
8607 | projectFileName?: string;
|
8608 | }
|
8609 | /**
|
8610 | * Navto request message; value of command field is "navto".
|
8611 | * Return list of objects giving file locations and symbols that
|
8612 | * match the search term given in argument 'searchTerm'. The
|
8613 | * context for the search is given by the named file.
|
8614 | */
|
8615 | interface NavtoRequest extends Request {
|
8616 | command: CommandTypes.Navto;
|
8617 | arguments: NavtoRequestArgs;
|
8618 | }
|
8619 | /**
|
8620 | * An item found in a navto response.
|
8621 | */
|
8622 | interface NavtoItem extends FileSpan {
|
8623 | /**
|
8624 | * The symbol's name.
|
8625 | */
|
8626 | name: string;
|
8627 | /**
|
8628 | * The symbol's kind (such as 'className' or 'parameterName').
|
8629 | */
|
8630 | kind: ScriptElementKind;
|
8631 | /**
|
8632 | * exact, substring, or prefix.
|
8633 | */
|
8634 | matchKind: string;
|
8635 | /**
|
8636 | * If this was a case sensitive or insensitive match.
|
8637 | */
|
8638 | isCaseSensitive: boolean;
|
8639 | /**
|
8640 | * Optional modifiers for the kind (such as 'public').
|
8641 | */
|
8642 | kindModifiers?: string;
|
8643 | /**
|
8644 | * Name of symbol's container symbol (if any); for example,
|
8645 | * the class name if symbol is a class member.
|
8646 | */
|
8647 | containerName?: string;
|
8648 | /**
|
8649 | * Kind of symbol's container symbol (if any).
|
8650 | */
|
8651 | containerKind?: ScriptElementKind;
|
8652 | }
|
8653 | /**
|
8654 | * Navto response message. Body is an array of navto items. Each
|
8655 | * item gives a symbol that matched the search term.
|
8656 | */
|
8657 | interface NavtoResponse extends Response {
|
8658 | body?: NavtoItem[];
|
8659 | }
|
8660 | /**
|
8661 | * Arguments for change request message.
|
8662 | */
|
8663 | interface ChangeRequestArgs extends FormatRequestArgs {
|
8664 | /**
|
8665 | * Optional string to insert at location (file, line, offset).
|
8666 | */
|
8667 | insertString?: string;
|
8668 | }
|
8669 | /**
|
8670 | * Change request message; value of command field is "change".
|
8671 | * Update the server's view of the file named by argument 'file'.
|
8672 | * Server does not currently send a response to a change request.
|
8673 | */
|
8674 | interface ChangeRequest extends FileLocationRequest {
|
8675 | command: CommandTypes.Change;
|
8676 | arguments: ChangeRequestArgs;
|
8677 | }
|
8678 | /**
|
8679 | * Response to "brace" request.
|
8680 | */
|
8681 | interface BraceResponse extends Response {
|
8682 | body?: TextSpan[];
|
8683 | }
|
8684 | /**
|
8685 | * Brace matching request; value of command field is "brace".
|
8686 | * Return response giving the file locations of matching braces
|
8687 | * found in file at location line, offset.
|
8688 | */
|
8689 | interface BraceRequest extends FileLocationRequest {
|
8690 | command: CommandTypes.Brace;
|
8691 | }
|
8692 | /**
|
8693 | * NavBar items request; value of command field is "navbar".
|
8694 | * Return response giving the list of navigation bar entries
|
8695 | * extracted from the requested file.
|
8696 | */
|
8697 | interface NavBarRequest extends FileRequest {
|
8698 | command: CommandTypes.NavBar;
|
8699 | }
|
8700 | /**
|
8701 | * NavTree request; value of command field is "navtree".
|
8702 | * Return response giving the navigation tree of the requested file.
|
8703 | */
|
8704 | interface NavTreeRequest extends FileRequest {
|
8705 | command: CommandTypes.NavTree;
|
8706 | }
|
8707 | interface NavigationBarItem {
|
8708 | /**
|
8709 | * The item's display text.
|
8710 | */
|
8711 | text: string;
|
8712 | /**
|
8713 | * The symbol's kind (such as 'className' or 'parameterName').
|
8714 | */
|
8715 | kind: ScriptElementKind;
|
8716 | /**
|
8717 | * Optional modifiers for the kind (such as 'public').
|
8718 | */
|
8719 | kindModifiers?: string;
|
8720 | /**
|
8721 | * The definition locations of the item.
|
8722 | */
|
8723 | spans: TextSpan[];
|
8724 | /**
|
8725 | * Optional children.
|
8726 | */
|
8727 | childItems?: NavigationBarItem[];
|
8728 | /**
|
8729 | * Number of levels deep this item should appear.
|
8730 | */
|
8731 | indent: number;
|
8732 | }
|
8733 | /** protocol.NavigationTree is identical to ts.NavigationTree, except using protocol.TextSpan instead of ts.TextSpan */
|
8734 | interface NavigationTree {
|
8735 | text: string;
|
8736 | kind: ScriptElementKind;
|
8737 | kindModifiers: string;
|
8738 | spans: TextSpan[];
|
8739 | nameSpan: TextSpan | undefined;
|
8740 | childItems?: NavigationTree[];
|
8741 | }
|
8742 | type TelemetryEventName = "telemetry";
|
8743 | interface TelemetryEvent extends Event {
|
8744 | event: TelemetryEventName;
|
8745 | body: TelemetryEventBody;
|
8746 | }
|
8747 | interface TelemetryEventBody {
|
8748 | telemetryEventName: string;
|
8749 | payload: any;
|
8750 | }
|
8751 | type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed";
|
8752 | interface TypesInstallerInitializationFailedEvent extends Event {
|
8753 | event: TypesInstallerInitializationFailedEventName;
|
8754 | body: TypesInstallerInitializationFailedEventBody;
|
8755 | }
|
8756 | interface TypesInstallerInitializationFailedEventBody {
|
8757 | message: string;
|
8758 | }
|
8759 | type TypingsInstalledTelemetryEventName = "typingsInstalled";
|
8760 | interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody {
|
8761 | telemetryEventName: TypingsInstalledTelemetryEventName;
|
8762 | payload: TypingsInstalledTelemetryEventPayload;
|
8763 | }
|
8764 | interface TypingsInstalledTelemetryEventPayload {
|
8765 | /**
|
8766 | * Comma separated list of installed typing packages
|
8767 | */
|
8768 | installedPackages: string;
|
8769 | /**
|
8770 | * true if install request succeeded, otherwise - false
|
8771 | */
|
8772 | installSuccess: boolean;
|
8773 | /**
|
8774 | * version of typings installer
|
8775 | */
|
8776 | typingsInstallerVersion: string;
|
8777 | }
|
8778 | type BeginInstallTypesEventName = "beginInstallTypes";
|
8779 | type EndInstallTypesEventName = "endInstallTypes";
|
8780 | interface BeginInstallTypesEvent extends Event {
|
8781 | event: BeginInstallTypesEventName;
|
8782 | body: BeginInstallTypesEventBody;
|
8783 | }
|
8784 | interface EndInstallTypesEvent extends Event {
|
8785 | event: EndInstallTypesEventName;
|
8786 | body: EndInstallTypesEventBody;
|
8787 | }
|
8788 | interface InstallTypesEventBody {
|
8789 | /**
|
8790 | * correlation id to match begin and end events
|
8791 | */
|
8792 | eventId: number;
|
8793 | /**
|
8794 | * list of packages to install
|
8795 | */
|
8796 | packages: readonly string[];
|
8797 | }
|
8798 | interface BeginInstallTypesEventBody extends InstallTypesEventBody {
|
8799 | }
|
8800 | interface EndInstallTypesEventBody extends InstallTypesEventBody {
|
8801 | /**
|
8802 | * true if installation succeeded, otherwise false
|
8803 | */
|
8804 | success: boolean;
|
8805 | }
|
8806 | interface NavBarResponse extends Response {
|
8807 | body?: NavigationBarItem[];
|
8808 | }
|
8809 | interface NavTreeResponse extends Response {
|
8810 | body?: NavigationTree;
|
8811 | }
|
8812 | interface CallHierarchyItem {
|
8813 | name: string;
|
8814 | kind: ScriptElementKind;
|
8815 | kindModifiers?: string;
|
8816 | file: string;
|
8817 | span: TextSpan;
|
8818 | selectionSpan: TextSpan;
|
8819 | containerName?: string;
|
8820 | }
|
8821 | interface CallHierarchyIncomingCall {
|
8822 | from: CallHierarchyItem;
|
8823 | fromSpans: TextSpan[];
|
8824 | }
|
8825 | interface CallHierarchyOutgoingCall {
|
8826 | to: CallHierarchyItem;
|
8827 | fromSpans: TextSpan[];
|
8828 | }
|
8829 | interface PrepareCallHierarchyRequest extends FileLocationRequest {
|
8830 | command: CommandTypes.PrepareCallHierarchy;
|
8831 | }
|
8832 | interface PrepareCallHierarchyResponse extends Response {
|
8833 | readonly body: CallHierarchyItem | CallHierarchyItem[];
|
8834 | }
|
8835 | interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest {
|
8836 | command: CommandTypes.ProvideCallHierarchyIncomingCalls;
|
8837 | }
|
8838 | interface ProvideCallHierarchyIncomingCallsResponse extends Response {
|
8839 | readonly body: CallHierarchyIncomingCall[];
|
8840 | }
|
8841 | interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest {
|
8842 | command: CommandTypes.ProvideCallHierarchyOutgoingCalls;
|
8843 | }
|
8844 | interface ProvideCallHierarchyOutgoingCallsResponse extends Response {
|
8845 | readonly body: CallHierarchyOutgoingCall[];
|
8846 | }
|
8847 | enum IndentStyle {
|
8848 | None = "None",
|
8849 | Block = "Block",
|
8850 | Smart = "Smart"
|
8851 | }
|
8852 | enum SemicolonPreference {
|
8853 | Ignore = "ignore",
|
8854 | Insert = "insert",
|
8855 | Remove = "remove"
|
8856 | }
|
8857 | interface EditorSettings {
|
8858 | baseIndentSize?: number;
|
8859 | indentSize?: number;
|
8860 | tabSize?: number;
|
8861 | newLineCharacter?: string;
|
8862 | convertTabsToSpaces?: boolean;
|
8863 | indentStyle?: IndentStyle | ts.IndentStyle;
|
8864 | trimTrailingWhitespace?: boolean;
|
8865 | }
|
8866 | interface FormatCodeSettings extends EditorSettings {
|
8867 | insertSpaceAfterCommaDelimiter?: boolean;
|
8868 | insertSpaceAfterSemicolonInForStatements?: boolean;
|
8869 | insertSpaceBeforeAndAfterBinaryOperators?: boolean;
|
8870 | insertSpaceAfterConstructor?: boolean;
|
8871 | insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
|
8872 | insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
|
8873 | insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
|
8874 | insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
|
8875 | insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
|
8876 | insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
|
8877 | insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
|
8878 | insertSpaceAfterTypeAssertion?: boolean;
|
8879 | insertSpaceBeforeFunctionParenthesis?: boolean;
|
8880 | placeOpenBraceOnNewLineForFunctions?: boolean;
|
8881 | placeOpenBraceOnNewLineForControlBlocks?: boolean;
|
8882 | insertSpaceBeforeTypeAnnotation?: boolean;
|
8883 | semicolons?: SemicolonPreference;
|
8884 | }
|
8885 | interface UserPreferences {
|
8886 | readonly disableSuggestions?: boolean;
|
8887 | readonly quotePreference?: "auto" | "double" | "single";
|
8888 | /**
|
8889 | * If enabled, TypeScript will search through all external modules' exports and add them to the completions list.
|
8890 | * This affects lone identifier completions but not completions on the right hand side of `obj.`.
|
8891 | */
|
8892 | readonly includeCompletionsForModuleExports?: boolean;
|
8893 | /**
|
8894 | * If enabled, the completion list will include completions with invalid identifier names.
|
8895 | * For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`.
|
8896 | */
|
8897 | readonly includeCompletionsWithInsertText?: boolean;
|
8898 | /**
|
8899 | * Unless this option is `false`, or `includeCompletionsWithInsertText` is not enabled,
|
8900 | * member completion lists triggered with `.` will include entries on potentially-null and potentially-undefined
|
8901 | * values, with insertion text to replace preceding `.` tokens with `?.`.
|
8902 | */
|
8903 | readonly includeAutomaticOptionalChainCompletions?: boolean;
|
8904 | readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative";
|
8905 | /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
|
8906 | readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
|
8907 | readonly allowTextChangesInNewFiles?: boolean;
|
8908 | readonly lazyConfiguredProjectsFromExternalProject?: boolean;
|
8909 | readonly providePrefixAndSuffixTextForRename?: boolean;
|
8910 | readonly provideRefactorNotApplicableReason?: boolean;
|
8911 | readonly allowRenameOfImportPath?: boolean;
|
8912 | readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
|
8913 | }
|
8914 | interface CompilerOptions {
|
8915 | allowJs?: boolean;
|
8916 | allowSyntheticDefaultImports?: boolean;
|
8917 | allowUnreachableCode?: boolean;
|
8918 | allowUnusedLabels?: boolean;
|
8919 | alwaysStrict?: boolean;
|
8920 | baseUrl?: string;
|
8921 | charset?: string;
|
8922 | checkJs?: boolean;
|
8923 | declaration?: boolean;
|
8924 | declarationDir?: string;
|
8925 | disableSizeLimit?: boolean;
|
8926 | downlevelIteration?: boolean;
|
8927 | emitBOM?: boolean;
|
8928 | emitDecoratorMetadata?: boolean;
|
8929 | experimentalDecorators?: boolean;
|
8930 | forceConsistentCasingInFileNames?: boolean;
|
8931 | importHelpers?: boolean;
|
8932 | inlineSourceMap?: boolean;
|
8933 | inlineSources?: boolean;
|
8934 | isolatedModules?: boolean;
|
8935 | jsx?: JsxEmit | ts.JsxEmit;
|
8936 | lib?: string[];
|
8937 | locale?: string;
|
8938 | mapRoot?: string;
|
8939 | maxNodeModuleJsDepth?: number;
|
8940 | module?: ModuleKind | ts.ModuleKind;
|
8941 | moduleResolution?: ModuleResolutionKind | ts.ModuleResolutionKind;
|
8942 | newLine?: NewLineKind | ts.NewLineKind;
|
8943 | noEmit?: boolean;
|
8944 | noEmitHelpers?: boolean;
|
8945 | noEmitOnError?: boolean;
|
8946 | noErrorTruncation?: boolean;
|
8947 | noFallthroughCasesInSwitch?: boolean;
|
8948 | noImplicitAny?: boolean;
|
8949 | noImplicitReturns?: boolean;
|
8950 | noImplicitThis?: boolean;
|
8951 | noUnusedLocals?: boolean;
|
8952 | noUnusedParameters?: boolean;
|
8953 | noImplicitUseStrict?: boolean;
|
8954 | noLib?: boolean;
|
8955 | noResolve?: boolean;
|
8956 | out?: string;
|
8957 | outDir?: string;
|
8958 | outFile?: string;
|
8959 | paths?: MapLike<string[]>;
|
8960 | plugins?: PluginImport[];
|
8961 | preserveConstEnums?: boolean;
|
8962 | preserveSymlinks?: boolean;
|
8963 | project?: string;
|
8964 | reactNamespace?: string;
|
8965 | removeComments?: boolean;
|
8966 | references?: ProjectReference[];
|
8967 | rootDir?: string;
|
8968 | rootDirs?: string[];
|
8969 | skipLibCheck?: boolean;
|
8970 | skipDefaultLibCheck?: boolean;
|
8971 | sourceMap?: boolean;
|
8972 | sourceRoot?: string;
|
8973 | strict?: boolean;
|
8974 | strictNullChecks?: boolean;
|
8975 | suppressExcessPropertyErrors?: boolean;
|
8976 | suppressImplicitAnyIndexErrors?: boolean;
|
8977 | useDefineForClassFields?: boolean;
|
8978 | target?: ScriptTarget | ts.ScriptTarget;
|
8979 | traceResolution?: boolean;
|
8980 | resolveJsonModule?: boolean;
|
8981 | types?: string[];
|
8982 | /** Paths used to used to compute primary types search locations */
|
8983 | typeRoots?: string[];
|
8984 | [option: string]: CompilerOptionsValue | undefined;
|
8985 | }
|
8986 | enum JsxEmit {
|
8987 | None = "None",
|
8988 | Preserve = "Preserve",
|
8989 | ReactNative = "ReactNative",
|
8990 | React = "React"
|
8991 | }
|
8992 | enum ModuleKind {
|
8993 | None = "None",
|
8994 | CommonJS = "CommonJS",
|
8995 | AMD = "AMD",
|
8996 | UMD = "UMD",
|
8997 | System = "System",
|
8998 | ES6 = "ES6",
|
8999 | ES2015 = "ES2015",
|
9000 | ESNext = "ESNext"
|
9001 | }
|
9002 | enum ModuleResolutionKind {
|
9003 | Classic = "Classic",
|
9004 | Node = "Node"
|
9005 | }
|
9006 | enum NewLineKind {
|
9007 | Crlf = "Crlf",
|
9008 | Lf = "Lf"
|
9009 | }
|
9010 | enum ScriptTarget {
|
9011 | ES3 = "ES3",
|
9012 | ES5 = "ES5",
|
9013 | ES6 = "ES6",
|
9014 | ES2015 = "ES2015",
|
9015 | ES2016 = "ES2016",
|
9016 | ES2017 = "ES2017",
|
9017 | ES2018 = "ES2018",
|
9018 | ES2019 = "ES2019",
|
9019 | ES2020 = "ES2020",
|
9020 | ESNext = "ESNext"
|
9021 | }
|
9022 | }
|
9023 | declare namespace ts.server {
|
9024 | interface ScriptInfoVersion {
|
9025 | svc: number;
|
9026 | text: number;
|
9027 | }
|
9028 | function isDynamicFileName(fileName: NormalizedPath): boolean;
|
9029 | class ScriptInfo {
|
9030 | private readonly host;
|
9031 | readonly fileName: NormalizedPath;
|
9032 | readonly scriptKind: ScriptKind;
|
9033 | readonly hasMixedContent: boolean;
|
9034 | readonly path: Path;
|
9035 | /**
|
9036 | * All projects that include this file
|
9037 | */
|
9038 | readonly containingProjects: Project[];
|
9039 | private formatSettings;
|
9040 | private preferences;
|
9041 | private textStorage;
|
9042 | constructor(host: ServerHost, fileName: NormalizedPath, scriptKind: ScriptKind, hasMixedContent: boolean, path: Path, initialVersion?: ScriptInfoVersion);
|
9043 | isScriptOpen(): boolean;
|
9044 | open(newText: string): void;
|
9045 | close(fileExists?: boolean): void;
|
9046 | getSnapshot(): IScriptSnapshot;
|
9047 | private ensureRealPath;
|
9048 | getFormatCodeSettings(): FormatCodeSettings | undefined;
|
9049 | getPreferences(): protocol.UserPreferences | undefined;
|
9050 | attachToProject(project: Project): boolean;
|
9051 | isAttached(project: Project): boolean;
|
9052 | detachFromProject(project: Project): void;
|
9053 | detachAllProjects(): void;
|
9054 | getDefaultProject(): Project;
|
9055 | registerFileUpdate(): void;
|
9056 | setOptions(formatSettings: FormatCodeSettings, preferences: protocol.UserPreferences | undefined): void;
|
9057 | getLatestVersion(): string;
|
9058 | saveTo(fileName: string): void;
|
9059 | reloadFromFile(tempFileName?: NormalizedPath): boolean;
|
9060 | editContent(start: number, end: number, newText: string): void;
|
9061 | markContainingProjectsAsDirty(): void;
|
9062 | isOrphan(): boolean;
|
9063 | /**
|
9064 | * @param line 1 based index
|
9065 | */
|
9066 | lineToTextSpan(line: number): TextSpan;
|
9067 | /**
|
9068 | * @param line 1 based index
|
9069 | * @param offset 1 based index
|
9070 | */
|
9071 | lineOffsetToPosition(line: number, offset: number): number;
|
9072 | positionToLineOffset(position: number): protocol.Location;
|
9073 | isJavaScript(): boolean;
|
9074 | }
|
9075 | }
|
9076 | declare namespace ts.server {
|
9077 | interface InstallPackageOptionsWithProject extends InstallPackageOptions {
|
9078 | projectName: string;
|
9079 | projectRootPath: Path;
|
9080 | }
|
9081 | interface ITypingsInstaller {
|
9082 | isKnownTypesPackageName(name: string): boolean;
|
9083 | installPackage(options: InstallPackageOptionsWithProject): Promise<ApplyCodeActionCommandResult>;
|
9084 | enqueueInstallTypingsRequest(p: Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray<string> | undefined): void;
|
9085 | attach(projectService: ProjectService): void;
|
9086 | onProjectClosed(p: Project): void;
|
9087 | readonly globalTypingsCacheLocation: string | undefined;
|
9088 | }
|
9089 | const nullTypingsInstaller: ITypingsInstaller;
|
9090 | }
|
9091 | declare namespace ts.server {
|
9092 | enum ProjectKind {
|
9093 | Inferred = 0,
|
9094 | Configured = 1,
|
9095 | External = 2,
|
9096 | AutoImportProvider = 3
|
9097 | }
|
9098 | function allRootFilesAreJsOrDts(project: Project): boolean;
|
9099 | function allFilesAreJsOrDts(project: Project): boolean;
|
9100 | interface PluginCreateInfo {
|
9101 | project: Project;
|
9102 | languageService: LanguageService;
|
9103 | languageServiceHost: LanguageServiceHost;
|
9104 | serverHost: ServerHost;
|
9105 | config: any;
|
9106 | }
|
9107 | interface PluginModule {
|
9108 | create(createInfo: PluginCreateInfo): LanguageService;
|
9109 | getExternalFiles?(proj: Project): string[];
|
9110 | onConfigurationChanged?(config: any): void;
|
9111 | }
|
9112 | interface PluginModuleWithName {
|
9113 | name: string;
|
9114 | module: PluginModule;
|
9115 | }
|
9116 | type PluginModuleFactory = (mod: {
|
9117 | typescript: typeof ts;
|
9118 | }) => PluginModule;
|
9119 | abstract class Project implements LanguageServiceHost, ModuleResolutionHost {
|
9120 | readonly projectName: string;
|
9121 | readonly projectKind: ProjectKind;
|
9122 | readonly projectService: ProjectService;
|
9123 | private documentRegistry;
|
9124 | private compilerOptions;
|
9125 | compileOnSaveEnabled: boolean;
|
9126 | protected watchOptions: WatchOptions | undefined;
|
9127 | private rootFiles;
|
9128 | private rootFilesMap;
|
9129 | private program;
|
9130 | private externalFiles;
|
9131 | private missingFilesMap;
|
9132 | private generatedFilesMap;
|
9133 | private plugins;
|
9134 | private lastFileExceededProgramSize;
|
9135 | protected languageService: LanguageService;
|
9136 | languageServiceEnabled: boolean;
|
9137 | readonly trace?: (s: string) => void;
|
9138 | readonly realpath?: (path: string) => string;
|
9139 | private builderState;
|
9140 | |
9141 |
|
9142 |
|
9143 | private updatedFileNames;
|
9144 | |
9145 |
|
9146 |
|
9147 | private lastReportedFileNames;
|
9148 | |
9149 |
|
9150 |
|
9151 | private lastReportedVersion;
|
9152 | |
9153 |
|
9154 |
|
9155 |
|
9156 | private projectProgramVersion;
|
9157 | |
9158 |
|
9159 |
|
9160 |
|
9161 |
|
9162 |
|
9163 | private projectStateVersion;
|
9164 | protected isInitialLoadPending: () => boolean;
|
9165 | private readonly cancellationToken;
|
9166 | isNonTsProject(): boolean;
|
9167 | isJsOnlyProject(): boolean;
|
9168 | static resolveModule(moduleName: string, initialDir: string, host: ServerHost, log: (message: string) => void, logErrors?: (message: string) => void): {} | undefined;
|
9169 | isKnownTypesPackageName(name: string): boolean;
|
9170 | installPackage(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>;
|
9171 | private get typingsCache();
|
9172 | getCompilationSettings(): CompilerOptions;
|
9173 | getCompilerOptions(): CompilerOptions;
|
9174 | getNewLine(): string;
|
9175 | getProjectVersion(): string;
|
9176 | getProjectReferences(): readonly ProjectReference[] | undefined;
|
9177 | getScriptFileNames(): string[];
|
9178 | private getOrCreateScriptInfoAndAttachToProject;
|
9179 | getScriptKind(fileName: string): ScriptKind;
|
9180 | getScriptVersion(filename: string): string;
|
9181 | getScriptSnapshot(filename: string): IScriptSnapshot | undefined;
|
9182 | getCancellationToken(): HostCancellationToken;
|
9183 | getCurrentDirectory(): string;
|
9184 | getDefaultLibFileName(): string;
|
9185 | useCaseSensitiveFileNames(): boolean;
|
9186 | readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
|
9187 | readFile(fileName: string): string | undefined;
|
9188 | writeFile(fileName: string, content: string): void;
|
9189 | fileExists(file: string): boolean;
|
9190 | resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames?: string[], redirectedReference?: ResolvedProjectReference): (ResolvedModuleFull | undefined)[];
|
9191 | getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string): ResolvedModuleWithFailedLookupLocations | undefined;
|
9192 | resolveTypeReferenceDirectives(typeDirectiveNames: string[], containingFile: string, redirectedReference?: ResolvedProjectReference): (ResolvedTypeReferenceDirective | undefined)[];
|
9193 | directoryExists(path: string): boolean;
|
9194 | getDirectories(path: string): string[];
|
9195 | log(s: string): void;
|
9196 | error(s: string): void;
|
9197 | private setInternalCompilerOptionsForEmittingJsFiles;
|
9198 | |
9199 |
|
9200 |
|
9201 | getGlobalProjectErrors(): readonly Diagnostic[];
|
9202 | getAllProjectErrors(): readonly Diagnostic[];
|
9203 | getLanguageService(ensureSynchronized?: boolean): LanguageService;
|
9204 | getCompileOnSaveAffectedFileList(scriptInfo: ScriptInfo): string[];
|
9205 | |
9206 |
|
9207 |
|
9208 | emitFile(scriptInfo: ScriptInfo, writeFile: (path: string, data: string, writeByteOrderMark?: boolean) => void): EmitResult;
|
9209 | enableLanguageService(): void;
|
9210 | disableLanguageService(lastFileExceededProgramSize?: string): void;
|
9211 | getProjectName(): string;
|
9212 | abstract getTypeAcquisition(): TypeAcquisition;
|
9213 | protected removeLocalTypingsFromTypeAcquisition(newTypeAcquisition: TypeAcquisition): TypeAcquisition;
|
9214 | getExternalFiles(): SortedReadonlyArray<string>;
|
9215 | getSourceFile(path: Path): SourceFile | undefined;
|
9216 | close(): void;
|
9217 | private detachScriptInfoIfNotRoot;
|
9218 | isClosed(): boolean;
|
9219 | hasRoots(): boolean;
|
9220 | getRootFiles(): NormalizedPath[];
|
9221 | getRootScriptInfos(): ScriptInfo[];
|
9222 | getScriptInfos(): ScriptInfo[];
|
9223 | getExcludedFiles(): readonly NormalizedPath[];
|
9224 | getFileNames(excludeFilesFromExternalLibraries?: boolean, excludeConfigFiles?: boolean): NormalizedPath[];
|
9225 | hasConfigFile(configFilePath: NormalizedPath): boolean;
|
9226 | containsScriptInfo(info: ScriptInfo): boolean;
|
9227 | containsFile(filename: NormalizedPath, requireOpen?: boolean): boolean;
|
9228 | isRoot(info: ScriptInfo): boolean;
|
9229 | addRoot(info: ScriptInfo, fileName?: NormalizedPath): void;
|
9230 | addMissingFileRoot(fileName: NormalizedPath): void;
|
9231 | removeFile(info: ScriptInfo, fileExists: boolean, detachFromProject: boolean): void;
|
9232 | registerFileUpdate(fileName: string): void;
|
9233 | markAsDirty(): void;
|
9234 | |
9235 |
|
9236 |
|
9237 |
|
9238 | updateGraph(): boolean;
|
9239 | protected removeExistingTypings(include: string[]): string[];
|
9240 | private updateGraphWorker;
|
9241 | private detachScriptInfoFromProject;
|
9242 | private addMissingFileWatcher;
|
9243 | private isWatchedMissingFile;
|
9244 | private createGeneratedFileWatcher;
|
9245 | private isValidGeneratedFileWatcher;
|
9246 | private clearGeneratedFileWatch;
|
9247 | getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo | undefined;
|
9248 | getScriptInfo(uncheckedFileName: string): ScriptInfo | undefined;
|
9249 | filesToString(writeProjectFileNames: boolean): string;
|
9250 | setCompilerOptions(compilerOptions: CompilerOptions): void;
|
9251 | protected removeRoot(info: ScriptInfo): void;
|
9252 | protected enableGlobalPlugins(options: CompilerOptions, pluginConfigOverrides: Map<any> | undefined): void;
|
9253 | protected enablePlugin(pluginConfigEntry: PluginImport, searchPaths: string[], pluginConfigOverrides: Map<any> | undefined): void;
|
9254 | private enableProxy;
|
9255 |
|
9256 | refreshDiagnostics(): void;
|
9257 | }
|
9258 | |
9259 |
|
9260 |
|
9261 |
|
9262 | class InferredProject extends Project {
|
9263 | private static readonly newName;
|
9264 | private _isJsInferredProject;
|
9265 | toggleJsInferredProject(isJsInferredProject: boolean): void;
|
9266 | setCompilerOptions(options?: CompilerOptions): void;
|
9267 |
|
9268 | readonly projectRootPath: string | undefined;
|
9269 | addRoot(info: ScriptInfo): void;
|
9270 | removeRoot(info: ScriptInfo): void;
|
9271 | isProjectWithSingleRoot(): boolean;
|
9272 | close(): void;
|
9273 | getTypeAcquisition(): TypeAcquisition;
|
9274 | }
|
9275 | class AutoImportProviderProject extends Project {
|
9276 | private hostProject;
|
9277 | private static readonly newName;
|
9278 | private rootFileNames;
|
9279 | isOrphan(): boolean;
|
9280 | updateGraph(): boolean;
|
9281 | markAsDirty(): void;
|
9282 | getScriptFileNames(): string[];
|
9283 | getLanguageService(): never;
|
9284 | markAutoImportProviderAsDirty(): never;
|
9285 | getModuleResolutionHostForAutoImportProvider(): never;
|
9286 | getProjectReferences(): readonly ProjectReference[] | undefined;
|
9287 | useSourceOfProjectReferenceRedirect(): boolean;
|
9288 | getTypeAcquisition(): TypeAcquisition;
|
9289 | }
|
9290 | |
9291 |
|
9292 |
|
9293 |
|
9294 |
|
9295 | class ConfiguredProject extends Project {
|
9296 | private typeAcquisition;
|
9297 | private directoriesWatchedForWildcards;
|
9298 | readonly canonicalConfigFilePath: NormalizedPath;
|
9299 |
|
9300 | private externalProjectRefCount;
|
9301 | private projectErrors;
|
9302 | private projectReferences;
|
9303 | |
9304 |
|
9305 |
|
9306 |
|
9307 | updateGraph(): boolean;
|
9308 | getConfigFilePath(): NormalizedPath;
|
9309 | getProjectReferences(): readonly ProjectReference[] | undefined;
|
9310 | updateReferences(refs: readonly ProjectReference[] | undefined): void;
|
9311 | |
9312 |
|
9313 |
|
9314 | getGlobalProjectErrors(): readonly Diagnostic[];
|
9315 | |
9316 |
|
9317 |
|
9318 | getAllProjectErrors(): readonly Diagnostic[];
|
9319 | setProjectErrors(projectErrors: Diagnostic[]): void;
|
9320 | setTypeAcquisition(newTypeAcquisition: TypeAcquisition): void;
|
9321 | getTypeAcquisition(): TypeAcquisition;
|
9322 | close(): void;
|
9323 | getEffectiveTypeRoots(): string[];
|
9324 | }
|
9325 | |
9326 |
|
9327 |
|
9328 |
|
9329 | class ExternalProject extends Project {
|
9330 | externalProjectName: string;
|
9331 | compileOnSaveEnabled: boolean;
|
9332 | excludedFiles: readonly NormalizedPath[];
|
9333 | private typeAcquisition;
|
9334 | updateGraph(): boolean;
|
9335 | getExcludedFiles(): readonly NormalizedPath[];
|
9336 | getTypeAcquisition(): TypeAcquisition;
|
9337 | setTypeAcquisition(newTypeAcquisition: TypeAcquisition): void;
|
9338 | }
|
9339 | }
|
9340 | declare namespace ts.server {
|
9341 | export const maxProgramSizeForNonTsFiles: number;
|
9342 | export const ProjectsUpdatedInBackgroundEvent = "projectsUpdatedInBackground";
|
9343 | export const ProjectLoadingStartEvent = "projectLoadingStart";
|
9344 | export const ProjectLoadingFinishEvent = "projectLoadingFinish";
|
9345 | export const LargeFileReferencedEvent = "largeFileReferenced";
|
9346 | export const ConfigFileDiagEvent = "configFileDiag";
|
9347 | export const ProjectLanguageServiceStateEvent = "projectLanguageServiceState";
|
9348 | export const ProjectInfoTelemetryEvent = "projectInfo";
|
9349 | export const OpenFileInfoTelemetryEvent = "openFileInfo";
|
9350 | export interface ProjectsUpdatedInBackgroundEvent {
|
9351 | eventName: typeof ProjectsUpdatedInBackgroundEvent;
|
9352 | data: {
|
9353 | openFiles: string[];
|
9354 | };
|
9355 | }
|
9356 | export interface ProjectLoadingStartEvent {
|
9357 | eventName: typeof ProjectLoadingStartEvent;
|
9358 | data: {
|
9359 | project: Project;
|
9360 | reason: string;
|
9361 | };
|
9362 | }
|
9363 | export interface ProjectLoadingFinishEvent {
|
9364 | eventName: typeof ProjectLoadingFinishEvent;
|
9365 | data: {
|
9366 | project: Project;
|
9367 | };
|
9368 | }
|
9369 | export interface LargeFileReferencedEvent {
|
9370 | eventName: typeof LargeFileReferencedEvent;
|
9371 | data: {
|
9372 | file: string;
|
9373 | fileSize: number;
|
9374 | maxFileSize: number;
|
9375 | };
|
9376 | }
|
9377 | export interface ConfigFileDiagEvent {
|
9378 | eventName: typeof ConfigFileDiagEvent;
|
9379 | data: {
|
9380 | triggerFile: string;
|
9381 | configFileName: string;
|
9382 | diagnostics: readonly Diagnostic[];
|
9383 | };
|
9384 | }
|
9385 | export interface ProjectLanguageServiceStateEvent {
|
9386 | eventName: typeof ProjectLanguageServiceStateEvent;
|
9387 | data: {
|
9388 | project: Project;
|
9389 | languageServiceEnabled: boolean;
|
9390 | };
|
9391 | }
|
9392 |
|
9393 | export interface ProjectInfoTelemetryEvent {
|
9394 | readonly eventName: typeof ProjectInfoTelemetryEvent;
|
9395 | readonly data: ProjectInfoTelemetryEventData;
|
9396 | }
|
9397 | export interface ProjectInfoTelemetryEventData {
|
9398 |
|
9399 | readonly projectId: string;
|
9400 |
|
9401 | readonly fileStats: FileStats;
|
9402 | |
9403 |
|
9404 |
|
9405 |
|
9406 | readonly compilerOptions: CompilerOptions;
|
9407 | readonly extends: boolean | undefined;
|
9408 | readonly files: boolean | undefined;
|
9409 | readonly include: boolean | undefined;
|
9410 | readonly exclude: boolean | undefined;
|
9411 | readonly compileOnSave: boolean;
|
9412 | readonly typeAcquisition: ProjectInfoTypeAcquisitionData;
|
9413 | readonly configFileName: "tsconfig.json" | "jsconfig.json" | "other";
|
9414 | readonly projectType: "external" | "configured";
|
9415 | readonly languageServiceEnabled: boolean;
|
9416 |
|
9417 | readonly version: string;
|
9418 | }
|
9419 | |
9420 |
|
9421 |
|
9422 |
|
9423 |
|
9424 | export interface OpenFileInfoTelemetryEvent {
|
9425 | readonly eventName: typeof OpenFileInfoTelemetryEvent;
|
9426 | readonly data: OpenFileInfoTelemetryEventData;
|
9427 | }
|
9428 | export interface OpenFileInfoTelemetryEventData {
|
9429 | readonly info: OpenFileInfo;
|
9430 | }
|
9431 | export interface ProjectInfoTypeAcquisitionData {
|
9432 | readonly enable: boolean | undefined;
|
9433 | readonly include: boolean;
|
9434 | readonly exclude: boolean;
|
9435 | }
|
9436 | export interface FileStats {
|
9437 | readonly js: number;
|
9438 | readonly jsSize?: number;
|
9439 | readonly jsx: number;
|
9440 | readonly jsxSize?: number;
|
9441 | readonly ts: number;
|
9442 | readonly tsSize?: number;
|
9443 | readonly tsx: number;
|
9444 | readonly tsxSize?: number;
|
9445 | readonly dts: number;
|
9446 | readonly dtsSize?: number;
|
9447 | readonly deferred: number;
|
9448 | readonly deferredSize?: number;
|
9449 | }
|
9450 | export interface OpenFileInfo {
|
9451 | readonly checkJs: boolean;
|
9452 | }
|
9453 | export type ProjectServiceEvent = LargeFileReferencedEvent | ProjectsUpdatedInBackgroundEvent | ProjectLoadingStartEvent | ProjectLoadingFinishEvent | ConfigFileDiagEvent | ProjectLanguageServiceStateEvent | ProjectInfoTelemetryEvent | OpenFileInfoTelemetryEvent;
|
9454 | export type ProjectServiceEventHandler = (event: ProjectServiceEvent) => void;
|
9455 | export interface SafeList {
|
9456 | [name: string]: {
|
9457 | match: RegExp;
|
9458 | exclude?: (string | number)[][];
|
9459 | types?: string[];
|
9460 | };
|
9461 | }
|
9462 | export interface TypesMapFile {
|
9463 | typesMap: SafeList;
|
9464 | simpleMap: {
|
9465 | [libName: string]: string;
|
9466 | };
|
9467 | }
|
9468 | export function convertFormatOptions(protocolOptions: protocol.FormatCodeSettings): FormatCodeSettings;
|
9469 | export function convertCompilerOptions(protocolOptions: protocol.ExternalProjectCompilerOptions): CompilerOptions & protocol.CompileOnSaveMixin;
|
9470 | export function convertWatchOptions(protocolOptions: protocol.ExternalProjectCompilerOptions): WatchOptions | undefined;
|
9471 | export function tryConvertScriptKindName(scriptKindName: protocol.ScriptKindName | ScriptKind): ScriptKind;
|
9472 | export function convertScriptKindName(scriptKindName: protocol.ScriptKindName): ScriptKind.Unknown | ScriptKind.JS | ScriptKind.JSX | ScriptKind.TS | ScriptKind.TSX;
|
9473 | export interface HostConfiguration {
|
9474 | formatCodeOptions: FormatCodeSettings;
|
9475 | preferences: protocol.UserPreferences;
|
9476 | hostInfo: string;
|
9477 | extraFileExtensions?: FileExtensionInfo[];
|
9478 | watchOptions?: WatchOptions;
|
9479 | }
|
9480 | export interface OpenConfiguredProjectResult {
|
9481 | configFileName?: NormalizedPath;
|
9482 | configFileErrors?: readonly Diagnostic[];
|
9483 | }
|
9484 | export interface ProjectServiceOptions {
|
9485 | host: ServerHost;
|
9486 | logger: Logger;
|
9487 | cancellationToken: HostCancellationToken;
|
9488 | useSingleInferredProject: boolean;
|
9489 | useInferredProjectPerProjectRoot: boolean;
|
9490 | typingsInstaller: ITypingsInstaller;
|
9491 | eventHandler?: ProjectServiceEventHandler;
|
9492 | suppressDiagnosticEvents?: boolean;
|
9493 | throttleWaitMilliseconds?: number;
|
9494 | globalPlugins?: readonly string[];
|
9495 | pluginProbeLocations?: readonly string[];
|
9496 | allowLocalPluginLoads?: boolean;
|
9497 | typesMapLocation?: string;
|
9498 |
|
9499 | syntaxOnly?: boolean;
|
9500 | serverMode?: LanguageServiceMode;
|
9501 | }
|
9502 | export class ProjectService {
|
9503 | private readonly scriptInfoInNodeModulesWatchers;
|
9504 | |
9505 |
|
9506 |
|
9507 |
|
9508 |
|
9509 | private readonly filenameToScriptInfoVersion;
|
9510 | private readonly allJsFilesForOpenFileTelemetry;
|
9511 | |
9512 |
|
9513 |
|
9514 | private readonly externalProjectToConfiguredProjectMap;
|
9515 | |
9516 |
|
9517 |
|
9518 | readonly externalProjects: ExternalProject[];
|
9519 | |
9520 |
|
9521 |
|
9522 | readonly inferredProjects: InferredProject[];
|
9523 | |
9524 |
|
9525 |
|
9526 | readonly configuredProjects: Map<ConfiguredProject>;
|
9527 | |
9528 |
|
9529 |
|
9530 | readonly openFiles: Map<NormalizedPath | undefined>;
|
9531 | |
9532 |
|
9533 |
|
9534 | private readonly openFilesWithNonRootedDiskPath;
|
9535 | private compilerOptionsForInferredProjects;
|
9536 | private compilerOptionsForInferredProjectsPerProjectRoot;
|
9537 | private watchOptionsForInferredProjects;
|
9538 | private watchOptionsForInferredProjectsPerProjectRoot;
|
9539 | |
9540 |
|
9541 |
|
9542 | private readonly projectToSizeMap;
|
9543 | |
9544 |
|
9545 |
|
9546 |
|
9547 |
|
9548 |
|
9549 |
|
9550 | private readonly configFileExistenceInfoCache;
|
9551 | private readonly hostConfiguration;
|
9552 | private safelist;
|
9553 | private readonly legacySafelist;
|
9554 | private pendingProjectUpdates;
|
9555 | readonly currentDirectory: NormalizedPath;
|
9556 | readonly toCanonicalFileName: (f: string) => string;
|
9557 | readonly host: ServerHost;
|
9558 | readonly logger: Logger;
|
9559 | readonly cancellationToken: HostCancellationToken;
|
9560 | readonly useSingleInferredProject: boolean;
|
9561 | readonly useInferredProjectPerProjectRoot: boolean;
|
9562 | readonly typingsInstaller: ITypingsInstaller;
|
9563 | private readonly globalCacheLocationDirectoryPath;
|
9564 | readonly throttleWaitMilliseconds?: number;
|
9565 | private readonly eventHandler?;
|
9566 | private readonly suppressDiagnosticEvents?;
|
9567 | readonly globalPlugins: readonly string[];
|
9568 | readonly pluginProbeLocations: readonly string[];
|
9569 | readonly allowLocalPluginLoads: boolean;
|
9570 | private currentPluginConfigOverrides;
|
9571 | readonly typesMapLocation: string | undefined;
|
9572 |
|
9573 | readonly syntaxOnly: boolean;
|
9574 | readonly serverMode: LanguageServiceMode;
|
9575 |
|
9576 | private readonly seenProjects;
|
9577 | private performanceEventHandler?;
|
9578 | constructor(opts: ProjectServiceOptions);
|
9579 | toPath(fileName: string): Path;
|
9580 | private loadTypesMap;
|
9581 | updateTypingsForProject(response: SetTypings | InvalidateCachedTypings | PackageInstalledResponse): void;
|
9582 | private delayUpdateProjectGraph;
|
9583 | private delayUpdateProjectGraphs;
|
9584 | setCompilerOptionsForInferredProjects(projectCompilerOptions: protocol.ExternalProjectCompilerOptions, projectRootPath?: string): void;
|
9585 | findProject(projectName: string): Project | undefined;
|
9586 | getDefaultProjectForFile(fileName: NormalizedPath, ensureProject: boolean): Project | undefined;
|
9587 | private doEnsureDefaultProjectForFile;
|
9588 | getScriptInfoEnsuringProjectsUptoDate(uncheckedFileName: string): ScriptInfo | undefined;
|
9589 | /**
|
9590 | * Ensures the project structures are upto date
|
9591 | * This means,
|
9592 | * - we go through all the projects and update them if they are dirty
|
9593 | * - if updates reflect some change in structure or there was pending request to ensure projects for open files
|
9594 | * ensure that each open script info has project
|
9595 | */
|
9596 | private ensureProjectStructuresUptoDate;
|
9597 | getFormatCodeOptions(file: NormalizedPath): FormatCodeSettings;
|
9598 | getPreferences(file: NormalizedPath): protocol.UserPreferences;
|
9599 | getHostFormatCodeOptions(): FormatCodeSettings;
|
9600 | getHostPreferences(): protocol.UserPreferences;
|
9601 | private onSourceFileChanged;
|
9602 | private handleSourceMapProjects;
|
9603 | private delayUpdateSourceInfoProjects;
|
9604 | private delayUpdateProjectsOfScriptInfoPath;
|
9605 | private handleDeletedFile;
|
9606 | /**
|
9607 | * This is the callback function for the config file add/remove/change at any location
|
9608 | * that matters to open script info but doesnt have configured project open
|
9609 | * for the config file
|
9610 | */
|
9611 | private onConfigFileChangeForOpenScriptInfo;
|
9612 | private removeProject;
|
9613 | private assignOrphanScriptInfosToInferredProject;
|
9614 | /**
|
9615 | * Remove this file from the set of open, non-configured files.
|
9616 | * @param info The file that has been closed or newly configured
|
9617 | */
|
9618 | private closeOpenFile;
|
9619 | private deleteScriptInfo;
|
9620 | private configFileExists;
|
9621 | private setConfigFileExistenceByNewConfiguredProject;
|
9622 | /**
|
9623 | * Returns true if the configFileExistenceInfo is needed/impacted by open files that are root of inferred project
|
9624 | */
|
9625 | private configFileExistenceImpactsRootOfInferredProject;
|
9626 | private setConfigFileExistenceInfoByClosedConfiguredProject;
|
9627 | private logConfigFileWatchUpdate;
|
9628 | /**
|
9629 | * Create the watcher for the configFileExistenceInfo
|
9630 | */
|
9631 | private createConfigFileWatcherOfConfigFileExistence;
|
9632 | /**
|
9633 | * Close the config file watcher in the cached ConfigFileExistenceInfo
|
9634 | * if there arent any open files that are root of inferred project
|
9635 | */
|
9636 | private closeConfigFileWatcherOfConfigFileExistenceInfo;
|
9637 | /**
|
9638 | * This is called on file close, so that we stop watching the config file for this script info
|
9639 | */
|
9640 | private stopWatchingConfigFilesForClosedScriptInfo;
|
9641 | /**
|
9642 | * This function tries to search for a tsconfig.json for the given file.
|
9643 | * This is different from the method the compiler uses because
|
9644 | * the compiler can assume it will always start searching in the
|
9645 | * current directory (the directory in which tsc was invoked).
|
9646 | * The server must start searching from the directory containing
|
9647 | * the newly opened file.
|
9648 | */
|
9649 | private forEachConfigFileLocation;
|
9650 | /**
|
9651 | * This function tries to search for a tsconfig.json for the given file.
|
9652 | * This is different from the method the compiler uses because
|
9653 | * the compiler can assume it will always start searching in the
|
9654 | * current directory (the directory in which tsc was invoked).
|
9655 | * The server must start searching from the directory containing
|
9656 | * the newly opened file.
|
9657 | * If script info is passed in, it is asserted to be open script info
|
9658 | * otherwise just file name
|
9659 | */
|
9660 | private getConfigFileNameForFile;
|
9661 | private printProjects;
|
9662 | private getConfiguredProjectByCanonicalConfigFilePath;
|
9663 | private findExternalProjectByProjectName;
|
9664 | /** Get a filename if the language service exceeds the maximum allowed program size; otherwise returns undefined. */
|
9665 | private getFilenameForExceededTotalSizeLimitForNonTsFiles;
|
9666 | private createExternalProject;
|
9667 | private addFilesToNonInferredProject;
|
9668 | private updateNonInferredProjectFiles;
|
9669 | private updateRootAndOptionsOfNonInferredProject;
|
9670 | private sendConfigFileDiagEvent;
|
9671 | private getOrCreateInferredProjectForProjectRootPathIfEnabled;
|
9672 | private getOrCreateSingleInferredProjectIfEnabled;
|
9673 | private getOrCreateSingleInferredWithoutProjectRoot;
|
9674 | private createInferredProject;
|
9675 | getScriptInfo(uncheckedFileName: string): ScriptInfo | undefined;
|
9676 | private watchClosedScriptInfo;
|
9677 | private watchClosedScriptInfoInNodeModules;
|
9678 | private getModifiedTime;
|
9679 | private refreshScriptInfo;
|
9680 | private refreshScriptInfosInDirectory;
|
9681 | private stopWatchingScriptInfo;
|
9682 | private getOrCreateScriptInfoNotOpenedByClientForNormalizedPath;
|
9683 | private getOrCreateScriptInfoOpenedByClientForNormalizedPath;
|
9684 | getOrCreateScriptInfoForNormalizedPath(fileName: NormalizedPath, openedByClient: boolean, fileContent?: string, scriptKind?: ScriptKind, hasMixedContent?: boolean, hostToQueryFileExistsOn?: {
|
9685 | fileExists(path: string): boolean;
|
9686 | }): ScriptInfo | undefined;
|
9687 | private getOrCreateScriptInfoWorker;
|
9688 | /**
|
9689 | * 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
|
9690 | */
|
9691 | getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo | undefined;
|
9692 | getScriptInfoForPath(fileName: Path): ScriptInfo | undefined;
|
9693 | private addSourceInfoToSourceMap;
|
9694 | private addMissingSourceMapFile;
|
9695 | setHostConfiguration(args: protocol.ConfigureRequestArguments): void;
|
9696 | closeLog(): void;
|
9697 | /**
|
9698 | * This function rebuilds the project for every file opened by the client
|
9699 | * This does not reload contents of open files from disk. But we could do that if needed
|
9700 | */
|
9701 | reloadProjects(): void;
|
9702 | private delayReloadConfiguredProjectForFiles;
|
9703 | /**
|
9704 | * This function goes through all the openFiles and tries to file the config file for them.
|
9705 | * If the config file is found and it refers to existing project, it reloads it either immediately
|
9706 | * or schedules it for reload depending on delayReload option
|
9707 | * If the there is no existing project it just opens the configured project for the config file
|
9708 | * reloadForInfo provides a way to filter out files to reload configured project for
|
9709 | */
|
9710 | private reloadConfiguredProjectForFiles;
|
9711 | /**
|
9712 | * Remove the root of inferred project if script info is part of another project
|
9713 | */
|
9714 | private removeRootOfInferredProjectIfNowPartOfOtherProject;
|
9715 | /**
|
9716 | * This function is to update the project structure for every inferred project.
|
9717 | * It is called on the premise that all the configured projects are
|
9718 | * up to date.
|
9719 | * This will go through open files and assign them to inferred project if open file is not part of any other project
|
9720 | * After that all the inferred project graphs are updated
|
9721 | */
|
9722 | private ensureProjectForOpenFiles;
|
9723 | /**
|
9724 | * Open file whose contents is managed by the client
|
9725 | * @param filename is absolute pathname
|
9726 | * @param fileContent is a known version of the file content that is more up to date than the one on disk
|
9727 | */
|
9728 | openClientFile(fileName: string, fileContent?: string, scriptKind?: ScriptKind, projectRootPath?: string): OpenConfiguredProjectResult;
|
9729 | private findExternalProjectContainingOpenScriptInfo;
|
9730 | private getOrCreateOpenScriptInfo;
|
9731 | private assignProjectToOpenedScriptInfo;
|
9732 | private createAncestorProjects;
|
9733 | private ensureProjectChildren;
|
9734 | private cleanupAfterOpeningFile;
|
9735 | openClientFileWithNormalizedPath(fileName: NormalizedPath, fileContent?: string, scriptKind?: ScriptKind, hasMixedContent?: boolean, projectRootPath?: NormalizedPath): OpenConfiguredProjectResult;
|
9736 | private removeOrphanConfiguredProjects;
|
9737 | private removeOrphanScriptInfos;
|
9738 | private telemetryOnOpenFile;
|
9739 | /**
|
9740 | * Close file whose contents is managed by the client
|
9741 | * @param filename is absolute pathname
|
9742 | */
|
9743 | closeClientFile(uncheckedFileName: string): void;
|
9744 | private collectChanges;
|
9745 | private closeConfiguredProjectReferencedFromExternalProject;
|
9746 | closeExternalProject(uncheckedFileName: string): void;
|
9747 | openExternalProjects(projects: protocol.ExternalProject[]): void;
|
9748 | /** Makes a filename safe to insert in a RegExp */
|
9749 | private static readonly filenameEscapeRegexp;
|
9750 | private static escapeFilenameForRegex;
|
9751 | resetSafeList(): void;
|
9752 | applySafeList(proj: protocol.ExternalProject): NormalizedPath[];
|
9753 | openExternalProject(proj: protocol.ExternalProject): void;
|
9754 | hasDeferredExtension(): boolean;
|
9755 | configurePlugin(args: protocol.ConfigurePluginRequestArguments): void;
|
9756 | }
|
9757 | export {};
|
9758 | }
|
9759 | declare namespace ts.server {
|
9760 | interface ServerCancellationToken extends HostCancellationToken {
|
9761 | setRequest(requestId: number): void;
|
9762 | resetRequest(requestId: number): void;
|
9763 | }
|
9764 | const nullCancellationToken: ServerCancellationToken;
|
9765 | interface PendingErrorCheck {
|
9766 | fileName: NormalizedPath;
|
9767 | project: Project;
|
9768 | }
|
9769 | type CommandNames = protocol.CommandTypes;
|
9770 | const CommandNames: any;
|
9771 | function formatMessage<T extends protocol.Message>(msg: T, logger: Logger, byteLength: (s: string, encoding: string) => number, newLine: string): string;
|
9772 | type Event = <T extends object>(body: T, eventName: string) => void;
|
9773 | interface EventSender {
|
9774 | event: Event;
|
9775 | }
|
9776 | interface SessionOptions {
|
9777 | host: ServerHost;
|
9778 | cancellationToken: ServerCancellationToken;
|
9779 | useSingleInferredProject: boolean;
|
9780 | useInferredProjectPerProjectRoot: boolean;
|
9781 | typingsInstaller: ITypingsInstaller;
|
9782 | byteLength: (buf: string, encoding?: string) => number;
|
9783 | hrtime: (start?: number[]) => number[];
|
9784 | logger: Logger;
|
9785 | |
9786 |
|
9787 |
|
9788 | canUseEvents: boolean;
|
9789 | eventHandler?: ProjectServiceEventHandler;
|
9790 |
|
9791 | suppressDiagnosticEvents?: boolean;
|
9792 |
|
9793 | syntaxOnly?: boolean;
|
9794 | serverMode?: LanguageServiceMode;
|
9795 | throttleWaitMilliseconds?: number;
|
9796 | noGetErrOnBackgroundUpdate?: boolean;
|
9797 | globalPlugins?: readonly string[];
|
9798 | pluginProbeLocations?: readonly string[];
|
9799 | allowLocalPluginLoads?: boolean;
|
9800 | typesMapLocation?: string;
|
9801 | }
|
9802 | class Session implements EventSender {
|
9803 | private readonly gcTimer;
|
9804 | protected projectService: ProjectService;
|
9805 | private changeSeq;
|
9806 | private performanceData;
|
9807 | private currentRequestId;
|
9808 | private errorCheck;
|
9809 | protected host: ServerHost;
|
9810 | private readonly cancellationToken;
|
9811 | protected readonly typingsInstaller: ITypingsInstaller;
|
9812 | protected byteLength: (buf: string, encoding?: string) => number;
|
9813 | private hrtime;
|
9814 | protected logger: Logger;
|
9815 | protected canUseEvents: boolean;
|
9816 | private suppressDiagnosticEvents?;
|
9817 | private eventHandler;
|
9818 | private readonly noGetErrOnBackgroundUpdate?;
|
9819 | constructor(opts: SessionOptions);
|
9820 | private sendRequestCompletedEvent;
|
9821 | private addPerformanceData;
|
9822 | private performanceEventHandler;
|
9823 | private defaultEventHandler;
|
9824 | private projectsUpdatedInBackgroundEvent;
|
9825 | logError(err: Error, cmd: string): void;
|
9826 | private logErrorWorker;
|
9827 | send(msg: protocol.Message): void;
|
9828 | event<T extends object>(body: T, eventName: string): void;
|
9829 | /** @deprecated */
|
9830 | output(info: any, cmdName: string, reqSeq?: number, errorMsg?: string): void;
|
9831 | private doOutput;
|
9832 | private semanticCheck;
|
9833 | private syntacticCheck;
|
9834 | private suggestionCheck;
|
9835 | private sendDiagnosticsEvent;
|
9836 | /** It is the caller's responsibility to verify that `!this.suppressDiagnosticEvents`. */
|
9837 | private updateErrorCheck;
|
9838 | private cleanProjects;
|
9839 | private cleanup;
|
9840 | private getEncodedSyntacticClassifications;
|
9841 | private getEncodedSemanticClassifications;
|
9842 | private getProject;
|
9843 | private getConfigFileAndProject;
|
9844 | private getConfigFileDiagnostics;
|
9845 | private convertToDiagnosticsWithLinePositionFromDiagnosticFile;
|
9846 | private getCompilerOptionsDiagnostics;
|
9847 | private convertToDiagnosticsWithLinePosition;
|
9848 | private getDiagnosticsWorker;
|
9849 | private getDefinition;
|
9850 | private mapDefinitionInfoLocations;
|
9851 | private getDefinitionAndBoundSpan;
|
9852 | private getEmitOutput;
|
9853 | private mapDefinitionInfo;
|
9854 | private static mapToOriginalLocation;
|
9855 | private toFileSpan;
|
9856 | private toFileSpanWithContext;
|
9857 | private getTypeDefinition;
|
9858 | private mapImplementationLocations;
|
9859 | private getImplementation;
|
9860 | private getOccurrences;
|
9861 | private getSyntacticDiagnosticsSync;
|
9862 | private getSemanticDiagnosticsSync;
|
9863 | private getSuggestionDiagnosticsSync;
|
9864 | private getJsxClosingTag;
|
9865 | private getDocumentHighlights;
|
9866 | private setCompilerOptionsForInferredProjects;
|
9867 | private getProjectInfo;
|
9868 | private getProjectInfoWorker;
|
9869 | private getRenameInfo;
|
9870 | private getProjects;
|
9871 | private getDefaultProject;
|
9872 | private getRenameLocations;
|
9873 | private mapRenameInfo;
|
9874 | private toSpanGroups;
|
9875 | private getReferences;
|
9876 | /**
|
9877 | * @param fileName is the name of the file to be opened
|
9878 | * @param fileContent is a version of the file content that is known to be more up to date than the one on disk
|
9879 | */
|
9880 | private openClientFile;
|
9881 | private getPosition;
|
9882 | private getPositionInFile;
|
9883 | private getFileAndProject;
|
9884 | private getFileAndLanguageServiceForSyntacticOperation;
|
9885 | private getFileAndProjectWorker;
|
9886 | private getOutliningSpans;
|
9887 | private getTodoComments;
|
9888 | private getDocCommentTemplate;
|
9889 | private getSpanOfEnclosingComment;
|
9890 | private getIndentation;
|
9891 | private getBreakpointStatement;
|
9892 | private getNameOrDottedNameSpan;
|
9893 | private isValidBraceCompletion;
|
9894 | private getQuickInfoWorker;
|
9895 | private getFormattingEditsForRange;
|
9896 | private getFormattingEditsForRangeFull;
|
9897 | private getFormattingEditsForDocumentFull;
|
9898 | private getFormattingEditsAfterKeystrokeFull;
|
9899 | private getFormattingEditsAfterKeystroke;
|
9900 | private getCompletions;
|
9901 | private getCompletionEntryDetails;
|
9902 | private getCompileOnSaveAffectedFileList;
|
9903 | private emitFile;
|
9904 | private getSignatureHelpItems;
|
9905 | private toPendingErrorCheck;
|
9906 | private getDiagnostics;
|
9907 | private change;
|
9908 | private reload;
|
9909 | private saveToTmp;
|
9910 | private closeClientFile;
|
9911 | private mapLocationNavigationBarItems;
|
9912 | private getNavigationBarItems;
|
9913 | private toLocationNavigationTree;
|
9914 | private getNavigationTree;
|
9915 | private getNavigateToItems;
|
9916 | private getFullNavigateToItems;
|
9917 | private getSupportedCodeFixes;
|
9918 | private isLocation;
|
9919 | private extractPositionOrRange;
|
9920 | private getRange;
|
9921 | private getApplicableRefactors;
|
9922 | private getEditsForRefactor;
|
9923 | private organizeImports;
|
9924 | private getEditsForFileRename;
|
9925 | private getCodeFixes;
|
9926 | private getCombinedCodeFix;
|
9927 | private applyCodeActionCommand;
|
9928 | private getStartAndEndPosition;
|
9929 | private mapCodeAction;
|
9930 | private mapCodeFixAction;
|
9931 | private mapTextChangesToCodeEdits;
|
9932 | private mapTextChangeToCodeEdit;
|
9933 | private convertTextChangeToCodeEdit;
|
9934 | private getBraceMatching;
|
9935 | private getDiagnosticsForProject;
|
9936 | private configurePlugin;
|
9937 | private getSmartSelectionRange;
|
9938 | private toggleLineComment;
|
9939 | private toggleMultilineComment;
|
9940 | private commentSelection;
|
9941 | private uncommentSelection;
|
9942 | private mapSelectionRange;
|
9943 | private getScriptInfoFromProjectService;
|
9944 | private toProtocolCallHierarchyItem;
|
9945 | private toProtocolCallHierarchyIncomingCall;
|
9946 | private toProtocolCallHierarchyOutgoingCall;
|
9947 | private prepareCallHierarchy;
|
9948 | private provideCallHierarchyIncomingCalls;
|
9949 | private provideCallHierarchyOutgoingCalls;
|
9950 | getCanonicalFileName(fileName: string): string;
|
9951 | exit(): void;
|
9952 | private notRequired;
|
9953 | private requiredResponse;
|
9954 | private handlers;
|
9955 | addProtocolHandler(command: string, handler: (request: protocol.Request) => HandlerResponse): void;
|
9956 | private setCurrentRequest;
|
9957 | private resetCurrentRequest;
|
9958 | executeWithRequestId<T>(requestId: number, f: () => T): T;
|
9959 | executeCommand(request: protocol.Request): HandlerResponse;
|
9960 | onMessage(message: string): void;
|
9961 | private getFormatOptions;
|
9962 | private getPreferences;
|
9963 | private getHostFormatOptions;
|
9964 | private getHostPreferences;
|
9965 | }
|
9966 | interface HandlerResponse {
|
9967 | response?: {};
|
9968 | responseRequired?: boolean;
|
9969 | }
|
9970 | }
|
9971 | declare namespace ts {
|
9972 |
|
9973 | const createNodeArray: <T extends Node>(elements?: readonly T[] | undefined, hasTrailingComma?: boolean | undefined) => NodeArray<T>;
|
9974 |
|
9975 | const createNumericLiteral: (value: string | number, numericLiteralFlags?: TokenFlags | undefined) => NumericLiteral;
|
9976 |
|
9977 | const createBigIntLiteral: (value: string | PseudoBigInt) => BigIntLiteral;
|
9978 |
|
9979 | const createStringLiteral: {
|
9980 | (text: string, isSingleQuote?: boolean | undefined): StringLiteral;
|
9981 | (text: string, isSingleQuote?: boolean | undefined, hasExtendedUnicodeEscape?: boolean | undefined): StringLiteral;
|
9982 | };
|
9983 |
|
9984 | const createStringLiteralFromNode: (sourceNode: Identifier | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral, isSingleQuote?: boolean | undefined) => StringLiteral;
|
9985 |
|
9986 | const createRegularExpressionLiteral: (text: string) => RegularExpressionLiteral;
|
9987 |
|
9988 | const createLoopVariable: () => Identifier;
|
9989 |
|
9990 | const createUniqueName: (text: string, flags?: GeneratedIdentifierFlags | undefined) => Identifier;
|
9991 |
|
9992 | const createPrivateIdentifier: (text: string) => PrivateIdentifier;
|
9993 |
|
9994 | const createSuper: () => SuperExpression;
|
9995 |
|
9996 | const createThis: () => ThisExpression;
|
9997 |
|
9998 | const createNull: () => NullLiteral;
|
9999 |
|
10000 | const createTrue: () => TrueLiteral;
|
10001 |
|
10002 | const createFalse: () => FalseLiteral;
|
10003 |
|
10004 | const createModifier: <T extends ModifierSyntaxKind>(kind: T) => ModifierToken<T>;
|
10005 |
|
10006 | const createModifiersFromModifierFlags: (flags: ModifierFlags) => Modifier[];
|
10007 |
|
10008 | const createQualifiedName: (left: EntityName, right: string | Identifier) => QualifiedName;
|
10009 |
|
10010 | const updateQualifiedName: (node: QualifiedName, left: EntityName, right: Identifier) => QualifiedName;
|
10011 |
|
10012 | const createComputedPropertyName: (expression: Expression) => ComputedPropertyName;
|
10013 |
|
10014 | const updateComputedPropertyName: (node: ComputedPropertyName, expression: Expression) => ComputedPropertyName;
|
10015 |
|
10016 | const createTypeParameterDeclaration: (name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined) => TypeParameterDeclaration;
|
10017 |
|
10018 | const updateTypeParameterDeclaration: (node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined) => TypeParameterDeclaration;
|
10019 |
|
10020 | const createParameter: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | Identifier | ObjectBindingPattern | ArrayBindingPattern, questionToken?: QuestionToken | undefined, type?: TypeNode | undefined, initializer?: Expression | undefined) => ParameterDeclaration;
|
10021 |
|
10022 | const updateParameter: (node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | Identifier | ObjectBindingPattern | ArrayBindingPattern, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => ParameterDeclaration;
|
10023 |
|
10024 | const createDecorator: (expression: Expression) => Decorator;
|
10025 |
|
10026 | const updateDecorator: (node: Decorator, expression: Expression) => Decorator;
|
10027 |
|
10028 | const createProperty: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertyDeclaration;
|
10029 |
|
10030 | const updateProperty: (node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertyDeclaration;
|
10031 |
|
10032 | const createMethod: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => MethodDeclaration;
|
10033 |
|
10034 | const updateMethod: (node: MethodDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => MethodDeclaration;
|
10035 |
|
10036 | const createConstructor: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined) => ConstructorDeclaration;
|
10037 |
|
10038 | const updateConstructor: (node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined) => ConstructorDeclaration;
|
10039 |
|
10040 | const createGetAccessor: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => GetAccessorDeclaration;
|
10041 |
|
10042 | const updateGetAccessor: (node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => GetAccessorDeclaration;
|
10043 |
|
10044 | const createSetAccessor: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, parameters: readonly ParameterDeclaration[], body: Block | undefined) => SetAccessorDeclaration;
|
10045 |
|
10046 | const updateSetAccessor: (node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined) => SetAccessorDeclaration;
|
10047 |
|
10048 | const createCallSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined) => CallSignatureDeclaration;
|
10049 |
|
10050 | const updateCallSignature: (node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined) => CallSignatureDeclaration;
|
10051 |
|
10052 | const createConstructSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined) => ConstructSignatureDeclaration;
|
10053 |
|
10054 | const updateConstructSignature: (node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined) => ConstructSignatureDeclaration;
|
10055 |
|
10056 | const updateIndexSignature: (node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => IndexSignatureDeclaration;
|
10057 |
|
10058 | const createKeywordTypeNode: <TKind extends KeywordTypeSyntaxKind>(kind: TKind) => KeywordTypeNode<TKind>;
|
10059 |
|
10060 | const createTypePredicateNodeWithModifier: (assertsModifier: AssertsKeyword | undefined, parameterName: string | Identifier | ThisTypeNode, type: TypeNode | undefined) => TypePredicateNode;
|
10061 |
|
10062 | const updateTypePredicateNodeWithModifier: (node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined) => TypePredicateNode;
|
10063 |
|
10064 | const createTypeReferenceNode: (typeName: string | Identifier | QualifiedName, typeArguments?: readonly TypeNode[] | undefined) => TypeReferenceNode;
|
10065 |
|
10066 | const updateTypeReferenceNode: (node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined) => TypeReferenceNode;
|
10067 |
|
10068 | const createFunctionTypeNode: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => FunctionTypeNode;
|
10069 |
|
10070 | const updateFunctionTypeNode: (node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => FunctionTypeNode;
|
10071 |
|
10072 | const createConstructorTypeNode: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => ConstructorTypeNode;
|
10073 |
|
10074 | const updateConstructorTypeNode: (node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => ConstructorTypeNode;
|
10075 |
|
10076 | const createTypeQueryNode: (exprName: EntityName) => TypeQueryNode;
|
10077 |
|
10078 | const updateTypeQueryNode: (node: TypeQueryNode, exprName: EntityName) => TypeQueryNode;
|
10079 |
|
10080 | const createTypeLiteralNode: (members: readonly TypeElement[] | undefined) => TypeLiteralNode;
|
10081 |
|
10082 | const updateTypeLiteralNode: (node: TypeLiteralNode, members: NodeArray<TypeElement>) => TypeLiteralNode;
|
10083 |
|
10084 | const createArrayTypeNode: (elementType: TypeNode) => ArrayTypeNode;
|
10085 |
|
10086 | const updateArrayTypeNode: (node: ArrayTypeNode, elementType: TypeNode) => ArrayTypeNode;
|
10087 |
|
10088 | const createTupleTypeNode: (elements: readonly (TypeNode | NamedTupleMember)[]) => TupleTypeNode;
|
10089 |
|
10090 | const updateTupleTypeNode: (node: TupleTypeNode, elements: readonly (TypeNode | NamedTupleMember)[]) => TupleTypeNode;
|
10091 |
|
10092 | const createOptionalTypeNode: (type: TypeNode) => OptionalTypeNode;
|
10093 |
|
10094 | const updateOptionalTypeNode: (node: OptionalTypeNode, type: TypeNode) => OptionalTypeNode;
|
10095 |
|
10096 | const createRestTypeNode: (type: TypeNode) => RestTypeNode;
|
10097 |
|
10098 | const updateRestTypeNode: (node: RestTypeNode, type: TypeNode) => RestTypeNode;
|
10099 |
|
10100 | const createUnionTypeNode: (types: readonly TypeNode[]) => UnionTypeNode;
|
10101 |
|
10102 | const updateUnionTypeNode: (node: UnionTypeNode, types: NodeArray<TypeNode>) => UnionTypeNode;
|
10103 |
|
10104 | const createIntersectionTypeNode: (types: readonly TypeNode[]) => IntersectionTypeNode;
|
10105 |
|
10106 | const updateIntersectionTypeNode: (node: IntersectionTypeNode, types: NodeArray<TypeNode>) => IntersectionTypeNode;
|
10107 |
|
10108 | const createConditionalTypeNode: (checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode) => ConditionalTypeNode;
|
10109 |
|
10110 | const updateConditionalTypeNode: (node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode) => ConditionalTypeNode;
|
10111 |
|
10112 | const createInferTypeNode: (typeParameter: TypeParameterDeclaration) => InferTypeNode;
|
10113 |
|
10114 | const updateInferTypeNode: (node: InferTypeNode, typeParameter: TypeParameterDeclaration) => InferTypeNode;
|
10115 |
|
10116 | const createImportTypeNode: (argument: TypeNode, qualifier?: Identifier | QualifiedName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined) => ImportTypeNode;
|
10117 |
|
10118 | const updateImportTypeNode: (node: ImportTypeNode, argument: TypeNode, qualifier: Identifier | QualifiedName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined) => ImportTypeNode;
|
10119 |
|
10120 | const createParenthesizedType: (type: TypeNode) => ParenthesizedTypeNode;
|
10121 |
|
10122 | const updateParenthesizedType: (node: ParenthesizedTypeNode, type: TypeNode) => ParenthesizedTypeNode;
|
10123 |
|
10124 | const createThisTypeNode: () => ThisTypeNode;
|
10125 |
|
10126 | const updateTypeOperatorNode: (node: TypeOperatorNode, type: TypeNode) => TypeOperatorNode;
|
10127 |
|
10128 | const createIndexedAccessTypeNode: (objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode;
|
10129 |
|
10130 | const updateIndexedAccessTypeNode: (node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode;
|
10131 |
|
10132 | const createMappedTypeNode: (readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode;
|
10133 |
|
10134 | const updateMappedTypeNode: (node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode;
|
10135 |
|
10136 | const createLiteralTypeNode: (literal: LiteralExpression | TrueLiteral | FalseLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode;
|
10137 |
|
10138 | const updateLiteralTypeNode: (node: LiteralTypeNode, literal: LiteralExpression | TrueLiteral | FalseLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode;
|
10139 |
|
10140 | const createObjectBindingPattern: (elements: readonly BindingElement[]) => ObjectBindingPattern;
|
10141 |
|
10142 | const updateObjectBindingPattern: (node: ObjectBindingPattern, elements: readonly BindingElement[]) => ObjectBindingPattern;
|
10143 |
|
10144 | const createArrayBindingPattern: (elements: readonly ArrayBindingElement[]) => ArrayBindingPattern;
|
10145 |
|
10146 | const updateArrayBindingPattern: (node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]) => ArrayBindingPattern;
|
10147 |
|
10148 | const createBindingElement: (dotDotDotToken: DotDotDotToken | undefined, propertyName: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier | undefined, name: string | Identifier | ObjectBindingPattern | ArrayBindingPattern, initializer?: Expression | undefined) => BindingElement;
|
10149 |
|
10150 | const updateBindingElement: (node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier | undefined, name: BindingName, initializer: Expression | undefined) => BindingElement;
|
10151 |
|
10152 | const createArrayLiteral: (elements?: readonly Expression[] | undefined, multiLine?: boolean | undefined) => ArrayLiteralExpression;
|
10153 |
|
10154 | const updateArrayLiteral: (node: ArrayLiteralExpression, elements: readonly Expression[]) => ArrayLiteralExpression;
|
10155 |
|
10156 | const createObjectLiteral: (properties?: readonly ObjectLiteralElementLike[] | undefined, multiLine?: boolean | undefined) => ObjectLiteralExpression;
|
10157 |
|
10158 | const updateObjectLiteral: (node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]) => ObjectLiteralExpression;
|
10159 |
|
10160 | const createPropertyAccess: (expression: Expression, name: string | Identifier | PrivateIdentifier) => PropertyAccessExpression;
|
10161 |
|
10162 | const updatePropertyAccess: (node: PropertyAccessExpression, expression: Expression, name: Identifier | PrivateIdentifier) => PropertyAccessExpression;
|
10163 |
|
10164 | const createPropertyAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | Identifier | PrivateIdentifier) => PropertyAccessChain;
|
10165 |
|
10166 | const updatePropertyAccessChain: (node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: Identifier | PrivateIdentifier) => PropertyAccessChain;
|
10167 |
|
10168 | const createElementAccess: (expression: Expression, index: number | Expression) => ElementAccessExpression;
|
10169 |
|
10170 | const updateElementAccess: (node: ElementAccessExpression, expression: Expression, argumentExpression: Expression) => ElementAccessExpression;
|
10171 |
|
10172 | const createElementAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression) => ElementAccessChain;
|
10173 |
|
10174 | const updateElementAccessChain: (node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression) => ElementAccessChain;
|
10175 |
|
10176 | const createCall: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallExpression;
|
10177 |
|
10178 | const updateCall: (node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallExpression;
|
10179 |
|
10180 | const createCallChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallChain;
|
10181 |
|
10182 | const updateCallChain: (node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallChain;
|
10183 |
|
10184 | const createNew: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression;
|
10185 |
|
10186 | const updateNew: (node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression;
|
10187 |
|
10188 | const createTypeAssertion: (type: TypeNode, expression: Expression) => TypeAssertion;
|
10189 |
|
10190 | const updateTypeAssertion: (node: TypeAssertion, type: TypeNode, expression: Expression) => TypeAssertion;
|
10191 |
|
10192 | const createParen: (expression: Expression) => ParenthesizedExpression;
|
10193 |
|
10194 | const updateParen: (node: ParenthesizedExpression, expression: Expression) => ParenthesizedExpression;
|
10195 |
|
10196 | const createFunctionExpression: (modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[] | undefined, type: TypeNode | undefined, body: Block) => FunctionExpression;
|
10197 |
|
10198 | const updateFunctionExpression: (node: FunctionExpression, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block) => FunctionExpression;
|
10199 |
|
10200 | const createDelete: (expression: Expression) => DeleteExpression;
|
10201 |
|
10202 | const updateDelete: (node: DeleteExpression, expression: Expression) => DeleteExpression;
|
10203 |
|
10204 | const createTypeOf: (expression: Expression) => TypeOfExpression;
|
10205 |
|
10206 | const updateTypeOf: (node: TypeOfExpression, expression: Expression) => TypeOfExpression;
|
10207 |
|
10208 | const createVoid: (expression: Expression) => VoidExpression;
|
10209 |
|
10210 | const updateVoid: (node: VoidExpression, expression: Expression) => VoidExpression;
|
10211 |
|
10212 | const createAwait: (expression: Expression) => AwaitExpression;
|
10213 |
|
10214 | const updateAwait: (node: AwaitExpression, expression: Expression) => AwaitExpression;
|
10215 |
|
10216 | const createPrefix: (operator: PrefixUnaryOperator, operand: Expression) => PrefixUnaryExpression;
|
10217 |
|
10218 | const updatePrefix: (node: PrefixUnaryExpression, operand: Expression) => PrefixUnaryExpression;
|
10219 |
|
10220 | const createPostfix: (operand: Expression, operator: PostfixUnaryOperator) => PostfixUnaryExpression;
|
10221 |
|
10222 | const updatePostfix: (node: PostfixUnaryExpression, operand: Expression) => PostfixUnaryExpression;
|
10223 |
|
10224 | const createBinary: (left: Expression, operator: SyntaxKind.CommaToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | BinaryOperatorToken, right: Expression) => BinaryExpression;
|
10225 |
|
10226 | const updateConditional: (node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression) => ConditionalExpression;
|
10227 |
|
10228 | const createTemplateExpression: (head: TemplateHead, templateSpans: readonly TemplateSpan[]) => TemplateExpression;
|
10229 |
|
10230 | const updateTemplateExpression: (node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]) => TemplateExpression;
|
10231 |
|
10232 | const createTemplateHead: {
|
10233 | (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateHead;
|
10234 | (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateHead;
|
10235 | };
|
10236 |
|
10237 | const createTemplateMiddle: {
|
10238 | (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateMiddle;
|
10239 | (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateMiddle;
|
10240 | };
|
10241 |
|
10242 | const createTemplateTail: {
|
10243 | (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateTail;
|
10244 | (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateTail;
|
10245 | };
|
10246 |
|
10247 | const createNoSubstitutionTemplateLiteral: {
|
10248 | (text: string, rawText?: string | undefined): NoSubstitutionTemplateLiteral;
|
10249 | (text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral;
|
10250 | };
|
10251 |
|
10252 | const updateYield: (node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined) => YieldExpression;
|
10253 |
|
10254 | const createSpread: (expression: Expression) => SpreadElement;
|
10255 |
|
10256 | const updateSpread: (node: SpreadElement, expression: Expression) => SpreadElement;
|
10257 |
|
10258 | const createOmittedExpression: () => OmittedExpression;
|
10259 |
|
10260 | const createAsExpression: (expression: Expression, type: TypeNode) => AsExpression;
|
10261 |
|
10262 | const updateAsExpression: (node: AsExpression, expression: Expression, type: TypeNode) => AsExpression;
|
10263 |
|
10264 | const createNonNullExpression: (expression: Expression) => NonNullExpression;
|
10265 |
|
10266 | const updateNonNullExpression: (node: NonNullExpression, expression: Expression) => NonNullExpression;
|
10267 |
|
10268 | const createNonNullChain: (expression: Expression) => NonNullChain;
|
10269 |
|
10270 | const updateNonNullChain: (node: NonNullChain, expression: Expression) => NonNullChain;
|
10271 |
|
10272 | const createMetaProperty: (keywordToken: SyntaxKind.ImportKeyword | SyntaxKind.NewKeyword, name: Identifier) => MetaProperty;
|
10273 |
|
10274 | const updateMetaProperty: (node: MetaProperty, name: Identifier) => MetaProperty;
|
10275 |
|
10276 | const createTemplateSpan: (expression: Expression, literal: TemplateMiddle | TemplateTail) => TemplateSpan;
|
10277 |
|
10278 | const updateTemplateSpan: (node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail) => TemplateSpan;
|
10279 |
|
10280 | const createSemicolonClassElement: () => SemicolonClassElement;
|
10281 |
|
10282 | const createBlock: (statements: readonly Statement[], multiLine?: boolean | undefined) => Block;
|
10283 |
|
10284 | const updateBlock: (node: Block, statements: readonly Statement[]) => Block;
|
10285 |
|
10286 | const createVariableStatement: (modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]) => VariableStatement;
|
10287 |
|
10288 | const updateVariableStatement: (node: VariableStatement, modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList) => VariableStatement;
|
10289 |
|
10290 | const createEmptyStatement: () => EmptyStatement;
|
10291 |
|
10292 | const createExpressionStatement: (expression: Expression) => ExpressionStatement;
|
10293 |
|
10294 | const updateExpressionStatement: (node: ExpressionStatement, expression: Expression) => ExpressionStatement;
|
10295 |
|
10296 | const createStatement: (expression: Expression) => ExpressionStatement;
|
10297 |
|
10298 | const updateStatement: (node: ExpressionStatement, expression: Expression) => ExpressionStatement;
|
10299 |
|
10300 | const createIf: (expression: Expression, thenStatement: Statement, elseStatement?: Statement | undefined) => IfStatement;
|
10301 |
|
10302 | const updateIf: (node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined) => IfStatement;
|
10303 |
|
10304 | const createDo: (statement: Statement, expression: Expression) => DoStatement;
|
10305 |
|
10306 | const updateDo: (node: DoStatement, statement: Statement, expression: Expression) => DoStatement;
|
10307 |
|
10308 | const createWhile: (expression: Expression, statement: Statement) => WhileStatement;
|
10309 |
|
10310 | const updateWhile: (node: WhileStatement, expression: Expression, statement: Statement) => WhileStatement;
|
10311 |
|
10312 | const createFor: (initializer: Expression | VariableDeclarationList | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement;
|
10313 |
|
10314 | const updateFor: (node: ForStatement, initializer: Expression | VariableDeclarationList | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement;
|
10315 |
|
10316 | const createForIn: (initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement;
|
10317 |
|
10318 | const updateForIn: (node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement;
|
10319 |
|
10320 | const createForOf: (awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement;
|
10321 |
|
10322 | const updateForOf: (node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement;
|
10323 |
|
10324 | const createContinue: (label?: string | Identifier | undefined) => ContinueStatement;
|
10325 |
|
10326 | const updateContinue: (node: ContinueStatement, label: Identifier | undefined) => ContinueStatement;
|
10327 |
|
10328 | const createBreak: (label?: string | Identifier | undefined) => BreakStatement;
|
10329 |
|
10330 | const updateBreak: (node: BreakStatement, label: Identifier | undefined) => BreakStatement;
|
10331 |
|
10332 | const createReturn: (expression?: Expression | undefined) => ReturnStatement;
|
10333 |
|
10334 | const updateReturn: (node: ReturnStatement, expression: Expression | undefined) => ReturnStatement;
|
10335 |
|
10336 | const createWith: (expression: Expression, statement: Statement) => WithStatement;
|
10337 |
|
10338 | const updateWith: (node: WithStatement, expression: Expression, statement: Statement) => WithStatement;
|
10339 |
|
10340 | const createSwitch: (expression: Expression, caseBlock: CaseBlock) => SwitchStatement;
|
10341 |
|
10342 | const updateSwitch: (node: SwitchStatement, expression: Expression, caseBlock: CaseBlock) => SwitchStatement;
|
10343 |
|
10344 | const createLabel: (label: string | Identifier, statement: Statement) => LabeledStatement;
|
10345 |
|
10346 | const updateLabel: (node: LabeledStatement, label: Identifier, statement: Statement) => LabeledStatement;
|
10347 |
|
10348 | const createThrow: (expression: Expression) => ThrowStatement;
|
10349 |
|
10350 | const updateThrow: (node: ThrowStatement, expression: Expression) => ThrowStatement;
|
10351 |
|
10352 | const createTry: (tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement;
|
10353 |
|
10354 | const updateTry: (node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement;
|
10355 |
|
10356 | const createDebuggerStatement: () => DebuggerStatement;
|
10357 |
|
10358 | const createVariableDeclarationList: (declarations: readonly VariableDeclaration[], flags?: NodeFlags | undefined) => VariableDeclarationList;
|
10359 |
|
10360 | const updateVariableDeclarationList: (node: VariableDeclarationList, declarations: readonly VariableDeclaration[]) => VariableDeclarationList;
|
10361 |
|
10362 | const createFunctionDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => FunctionDeclaration;
|
10363 |
|
10364 | const updateFunctionDeclaration: (node: FunctionDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => FunctionDeclaration;
|
10365 |
|
10366 | const createClassDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassDeclaration;
|
10367 |
|
10368 | const updateClassDeclaration: (node: ClassDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassDeclaration;
|
10369 |
|
10370 | const createInterfaceDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]) => InterfaceDeclaration;
|
10371 |
|
10372 | const updateInterfaceDeclaration: (node: InterfaceDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]) => InterfaceDeclaration;
|
10373 |
|
10374 | const createTypeAliasDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode) => TypeAliasDeclaration;
|
10375 |
|
10376 | const updateTypeAliasDeclaration: (node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode) => TypeAliasDeclaration;
|
10377 |
|
10378 | const createEnumDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]) => EnumDeclaration;
|
10379 |
|
10380 | const updateEnumDeclaration: (node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]) => EnumDeclaration;
|
10381 |
|
10382 | const createModuleDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: Identifier | ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | undefined, flags?: NodeFlags | undefined) => ModuleDeclaration;
|
10383 |
|
10384 | const updateModuleDeclaration: (node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: Identifier | ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | undefined) => ModuleDeclaration;
|
10385 |
|
10386 | const createModuleBlock: (statements: readonly Statement[]) => ModuleBlock;
|
10387 |
|
10388 | const updateModuleBlock: (node: ModuleBlock, statements: readonly Statement[]) => ModuleBlock;
|
10389 |
|
10390 | const createCaseBlock: (clauses: readonly CaseOrDefaultClause[]) => CaseBlock;
|
10391 |
|
10392 | const updateCaseBlock: (node: CaseBlock, clauses: readonly CaseOrDefaultClause[]) => CaseBlock;
|
10393 |
|
10394 | const createNamespaceExportDeclaration: (name: string | Identifier) => NamespaceExportDeclaration;
|
10395 |
|
10396 | const updateNamespaceExportDeclaration: (node: NamespaceExportDeclaration, name: Identifier) => NamespaceExportDeclaration;
|
10397 |
|
10398 | const createImportEqualsDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, moduleReference: ModuleReference) => ImportEqualsDeclaration;
|
10399 |
|
10400 | const updateImportEqualsDeclaration: (node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, moduleReference: ModuleReference) => ImportEqualsDeclaration;
|
10401 |
|
10402 | const createImportDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression) => ImportDeclaration;
|
10403 |
|
10404 | const updateImportDeclaration: (node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression) => ImportDeclaration;
|
10405 |
|
10406 | const createNamespaceImport: (name: Identifier) => NamespaceImport;
|
10407 |
|
10408 | const updateNamespaceImport: (node: NamespaceImport, name: Identifier) => NamespaceImport;
|
10409 |
|
10410 | const createNamedImports: (elements: readonly ImportSpecifier[]) => NamedImports;
|
10411 |
|
10412 | const updateNamedImports: (node: NamedImports, elements: readonly ImportSpecifier[]) => NamedImports;
|
10413 |
|
10414 | const createImportSpecifier: (propertyName: Identifier | undefined, name: Identifier) => ImportSpecifier;
|
10415 |
|
10416 | const updateImportSpecifier: (node: ImportSpecifier, propertyName: Identifier | undefined, name: Identifier) => ImportSpecifier;
|
10417 |
|
10418 | const createExportAssignment: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression) => ExportAssignment;
|
10419 |
|
10420 | const updateExportAssignment: (node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression) => ExportAssignment;
|
10421 |
|
10422 | const createNamedExports: (elements: readonly ExportSpecifier[]) => NamedExports;
|
10423 |
|
10424 | const updateNamedExports: (node: NamedExports, elements: readonly ExportSpecifier[]) => NamedExports;
|
10425 |
|
10426 | const createExportSpecifier: (propertyName: string | Identifier | undefined, name: string | Identifier) => ExportSpecifier;
|
10427 |
|
10428 | const updateExportSpecifier: (node: ExportSpecifier, propertyName: Identifier | undefined, name: Identifier) => ExportSpecifier;
|
10429 |
|
10430 | const createExternalModuleReference: (expression: Expression) => ExternalModuleReference;
|
10431 |
|
10432 | const updateExternalModuleReference: (node: ExternalModuleReference, expression: Expression) => ExternalModuleReference;
|
10433 |
|
10434 | const createJSDocTypeExpression: (type: TypeNode) => JSDocTypeExpression;
|
10435 |
|
10436 | const createJSDocTypeTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocTypeTag;
|
10437 |
|
10438 | const createJSDocReturnTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocReturnTag;
|
10439 |
|
10440 | const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocThisTag;
|
10441 |
|
10442 | const createJSDocComment: (comment?: string | undefined, tags?: readonly JSDocTag[] | undefined) => JSDoc;
|
10443 |
|
10444 | const createJSDocParameterTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | undefined) => JSDocParameterTag;
|
10445 |
|
10446 | const createJSDocClassTag: (tagName: Identifier | undefined, comment?: string | undefined) => JSDocClassTag;
|
10447 |
|
10448 | const createJSDocAugmentsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & {
|
10449 | readonly expression: Identifier | PropertyAccessEntityNameExpression;
|
10450 | }, comment?: string | undefined) => JSDocAugmentsTag;
|
10451 |
|
10452 | const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocEnumTag;
|
10453 |
|
10454 | const createJSDocTemplateTag: (tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | undefined) => JSDocTemplateTag;
|
10455 |
|
10456 | const createJSDocTypedefTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeLiteral | JSDocTypeExpression | undefined, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | undefined) => JSDocTypedefTag;
|
10457 |
|
10458 | const createJSDocCallbackTag: (tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | undefined) => JSDocCallbackTag;
|
10459 |
|
10460 | const createJSDocSignature: (typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag | undefined) => JSDocSignature;
|
10461 |
|
10462 | const createJSDocPropertyTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | undefined) => JSDocPropertyTag;
|
10463 |
|
10464 | const createJSDocTypeLiteral: (jsDocPropertyTags?: readonly JSDocPropertyLikeTag[] | undefined, isArrayType?: boolean | undefined) => JSDocTypeLiteral;
|
10465 |
|
10466 | const createJSDocImplementsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & {
|
10467 | readonly expression: Identifier | PropertyAccessEntityNameExpression;
|
10468 | }, comment?: string | undefined) => JSDocImplementsTag;
|
10469 |
|
10470 | const createJSDocAuthorTag: (tagName: Identifier | undefined, comment?: string | undefined) => JSDocAuthorTag;
|
10471 |
|
10472 | const createJSDocPublicTag: (tagName: Identifier | undefined, comment?: string | undefined) => JSDocPublicTag;
|
10473 |
|
10474 | const createJSDocPrivateTag: (tagName: Identifier | undefined, comment?: string | undefined) => JSDocPrivateTag;
|
10475 |
|
10476 | const createJSDocProtectedTag: (tagName: Identifier | undefined, comment?: string | undefined) => JSDocProtectedTag;
|
10477 |
|
10478 | const createJSDocReadonlyTag: (tagName: Identifier | undefined, comment?: string | undefined) => JSDocReadonlyTag;
|
10479 |
|
10480 | const createJSDocTag: (tagName: Identifier, comment?: string | undefined) => JSDocUnknownTag;
|
10481 |
|
10482 | const createJsxElement: (openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement) => JsxElement;
|
10483 |
|
10484 | const updateJsxElement: (node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement) => JsxElement;
|
10485 |
|
10486 | const createJsxSelfClosingElement: (tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxSelfClosingElement;
|
10487 |
|
10488 | const updateJsxSelfClosingElement: (node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxSelfClosingElement;
|
10489 |
|
10490 | const createJsxOpeningElement: (tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxOpeningElement;
|
10491 |
|
10492 | const updateJsxOpeningElement: (node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxOpeningElement;
|
10493 |
|
10494 | const createJsxClosingElement: (tagName: JsxTagNameExpression) => JsxClosingElement;
|
10495 |
|
10496 | const updateJsxClosingElement: (node: JsxClosingElement, tagName: JsxTagNameExpression) => JsxClosingElement;
|
10497 |
|
10498 | const createJsxFragment: (openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment;
|
10499 |
|
10500 | const createJsxText: (text: string, containsOnlyTriviaWhiteSpaces?: boolean | undefined) => JsxText;
|
10501 |
|
10502 | const updateJsxText: (node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean | undefined) => JsxText;
|
10503 |
|
10504 | const createJsxOpeningFragment: () => JsxOpeningFragment;
|
10505 |
|
10506 | const createJsxJsxClosingFragment: () => JsxClosingFragment;
|
10507 |
|
10508 | const updateJsxFragment: (node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment;
|
10509 |
|
10510 | const createJsxAttribute: (name: Identifier, initializer: StringLiteral | JsxExpression | undefined) => JsxAttribute;
|
10511 |
|
10512 | const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined) => JsxAttribute;
|
10513 |
|
10514 | const createJsxAttributes: (properties: readonly JsxAttributeLike[]) => JsxAttributes;
|
10515 |
|
10516 | const updateJsxAttributes: (node: JsxAttributes, properties: readonly JsxAttributeLike[]) => JsxAttributes;
|
10517 |
|
10518 | const createJsxSpreadAttribute: (expression: Expression) => JsxSpreadAttribute;
|
10519 |
|
10520 | const updateJsxSpreadAttribute: (node: JsxSpreadAttribute, expression: Expression) => JsxSpreadAttribute;
|
10521 |
|
10522 | const createJsxExpression: (dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined) => JsxExpression;
|
10523 |
|
10524 | const updateJsxExpression: (node: JsxExpression, expression: Expression | undefined) => JsxExpression;
|
10525 |
|
10526 | const createCaseClause: (expression: Expression, statements: readonly Statement[]) => CaseClause;
|
10527 |
|
10528 | const updateCaseClause: (node: CaseClause, expression: Expression, statements: readonly Statement[]) => CaseClause;
|
10529 |
|
10530 | const createDefaultClause: (statements: readonly Statement[]) => DefaultClause;
|
10531 |
|
10532 | const updateDefaultClause: (node: DefaultClause, statements: readonly Statement[]) => DefaultClause;
|
10533 |
|
10534 | const createHeritageClause: (token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword, types: readonly ExpressionWithTypeArguments[]) => HeritageClause;
|
10535 |
|
10536 | const updateHeritageClause: (node: HeritageClause, types: readonly ExpressionWithTypeArguments[]) => HeritageClause;
|
10537 |
|
10538 | const createCatchClause: (variableDeclaration: string | VariableDeclaration | undefined, block: Block) => CatchClause;
|
10539 |
|
10540 | const updateCatchClause: (node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block) => CatchClause;
|
10541 |
|
10542 | const createPropertyAssignment: (name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, initializer: Expression) => PropertyAssignment;
|
10543 |
|
10544 | const updatePropertyAssignment: (node: PropertyAssignment, name: PropertyName, initializer: Expression) => PropertyAssignment;
|
10545 |
|
10546 | const createShorthandPropertyAssignment: (name: string | Identifier, objectAssignmentInitializer?: Expression | undefined) => ShorthandPropertyAssignment;
|
10547 |
|
10548 | const updateShorthandPropertyAssignment: (node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined) => ShorthandPropertyAssignment;
|
10549 |
|
10550 | const createSpreadAssignment: (expression: Expression) => SpreadAssignment;
|
10551 |
|
10552 | const updateSpreadAssignment: (node: SpreadAssignment, expression: Expression) => SpreadAssignment;
|
10553 |
|
10554 | const createEnumMember: (name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, initializer?: Expression | undefined) => EnumMember;
|
10555 |
|
10556 | const updateEnumMember: (node: EnumMember, name: PropertyName, initializer: Expression | undefined) => EnumMember;
|
10557 |
|
10558 | const updateSourceFileNode: (node: SourceFile, statements: readonly Statement[], isDeclarationFile?: boolean | undefined, referencedFiles?: readonly FileReference[] | undefined, typeReferences?: readonly FileReference[] | undefined, hasNoDefaultLib?: boolean | undefined, libReferences?: readonly FileReference[] | undefined) => SourceFile;
|
10559 |
|
10560 | const createNotEmittedStatement: (original: Node) => NotEmittedStatement;
|
10561 |
|
10562 | const createPartiallyEmittedExpression: (expression: Expression, original?: Node | undefined) => PartiallyEmittedExpression;
|
10563 |
|
10564 | const updatePartiallyEmittedExpression: (node: PartiallyEmittedExpression, expression: Expression) => PartiallyEmittedExpression;
|
10565 |
|
10566 | const createCommaList: (elements: readonly Expression[]) => CommaListExpression;
|
10567 |
|
10568 | const updateCommaList: (node: CommaListExpression, elements: readonly Expression[]) => CommaListExpression;
|
10569 |
|
10570 | const createBundle: (sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[] | undefined) => Bundle;
|
10571 |
|
10572 | const updateBundle: (node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[] | undefined) => Bundle;
|
10573 |
|
10574 | const createImmediatelyInvokedFunctionExpression: {
|
10575 | (statements: readonly Statement[]): CallExpression;
|
10576 | (statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
|
10577 | };
|
10578 |
|
10579 | const createImmediatelyInvokedArrowFunction: {
|
10580 | (statements: readonly Statement[]): CallExpression;
|
10581 | (statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
|
10582 | };
|
10583 |
|
10584 | const createVoidZero: () => VoidExpression;
|
10585 |
|
10586 | const createExportDefault: (expression: Expression) => ExportAssignment;
|
10587 |
|
10588 | const createExternalModuleExport: (exportName: Identifier) => ExportDeclaration;
|
10589 |
|
10590 | const createNamespaceExport: (name: Identifier) => NamespaceExport;
|
10591 |
|
10592 | const updateNamespaceExport: (node: NamespaceExport, name: Identifier) => NamespaceExport;
|
10593 |
|
10594 | const createToken: <TKind extends SyntaxKind>(kind: TKind) => Token<TKind>;
|
10595 |
|
10596 | const createIdentifier: (text: string) => Identifier;
|
10597 |
|
10598 | const createTempVariable: (recordTempVariable: ((node: Identifier) => void) | undefined) => Identifier;
|
10599 |
|
10600 | const getGeneratedNameForNode: (node: Node | undefined) => Identifier;
|
10601 |
|
10602 | const createOptimisticUniqueName: (text: string) => Identifier;
|
10603 |
|
10604 | const createFileLevelUniqueName: (text: string) => Identifier;
|
10605 |
|
10606 | const createIndexSignature: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => IndexSignatureDeclaration;
|
10607 |
|
10608 | const createTypePredicateNode: (parameterName: Identifier | ThisTypeNode | string, type: TypeNode) => TypePredicateNode;
|
10609 |
|
10610 | const updateTypePredicateNode: (node: TypePredicateNode, parameterName: Identifier | ThisTypeNode, type: TypeNode) => TypePredicateNode;
|
10611 |
|
10612 | const createLiteral: {
|
10613 | (value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral;
|
10614 | (value: number | PseudoBigInt): NumericLiteral;
|
10615 | (value: boolean): BooleanLiteral;
|
10616 | (value: string | number | PseudoBigInt | boolean): PrimaryExpression;
|
10617 | };
|
10618 |
|
10619 | const createMethodSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined) => MethodSignature;
|
10620 |
|
10621 | const updateMethodSignature: (node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined) => MethodSignature;
|
10622 |
|
10623 | const createTypeOperatorNode: {
|
10624 | (type: TypeNode): TypeOperatorNode;
|
10625 | (operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode;
|
10626 | };
|
10627 |
|
10628 | const createTaggedTemplate: {
|
10629 | (tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
|
10630 | (tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
|
10631 | };
|
10632 |
|
10633 | const updateTaggedTemplate: {
|
10634 | (node: TaggedTemplateExpression, tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
|
10635 | (node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
|
10636 | };
|
10637 |
|
10638 | const updateBinary: (node: BinaryExpression, left: Expression, right: Expression, operator?: BinaryOperator | BinaryOperatorToken) => BinaryExpression;
|
10639 |
|
10640 | const createConditional: {
|
10641 | (condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression;
|
10642 | (condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression;
|
10643 | };
|
10644 |
|
10645 | const createYield: {
|
10646 | (expression?: Expression | undefined): YieldExpression;
|
10647 | (asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression;
|
10648 | };
|
10649 |
|
10650 | const createClassExpression: (modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression;
|
10651 |
|
10652 | const updateClassExpression: (node: ClassExpression, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression;
|
10653 |
|
10654 | const createPropertySignature: (modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer?: Expression | undefined) => PropertySignature;
|
10655 |
|
10656 | const updatePropertySignature: (node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertySignature;
|
10657 |
|
10658 | const createExpressionWithTypeArguments: (typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments;
|
10659 |
|
10660 | const updateExpressionWithTypeArguments: (node: ExpressionWithTypeArguments, typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments;
|
10661 |
|
10662 | const createArrowFunction: {
|
10663 | (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction;
|
10664 | (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction;
|
10665 | };
|
10666 |
|
10667 | const updateArrowFunction: {
|
10668 | (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction;
|
10669 | (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction;
|
10670 | };
|
10671 |
|
10672 | const createVariableDeclaration: {
|
10673 | (name: string | BindingName, type?: TypeNode | undefined, initializer?: Expression | undefined): VariableDeclaration;
|
10674 | (name: string | BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
|
10675 | };
|
10676 |
|
10677 | const updateVariableDeclaration: {
|
10678 | (node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
|
10679 | (node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
|
10680 | };
|
10681 |
|
10682 | const createImportClause: (name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly?: any) => ImportClause;
|
10683 |
|
10684 | const updateImportClause: (node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly: boolean) => ImportClause;
|
10685 |
|
10686 | const createExportDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression | undefined, isTypeOnly?: any) => ExportDeclaration;
|
10687 |
|
10688 | const updateExportDeclaration: (node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, isTypeOnly: boolean) => ExportDeclaration;
|
10689 |
|
10690 | const createJSDocParamTag: (name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocParameterTag;
|
10691 |
|
10692 | const createComma: (left: Expression, right: Expression) => Expression;
|
10693 |
|
10694 | const createLessThan: (left: Expression, right: Expression) => Expression;
|
10695 |
|
10696 | const createAssignment: (left: Expression, right: Expression) => BinaryExpression;
|
10697 |
|
10698 | const createStrictEquality: (left: Expression, right: Expression) => BinaryExpression;
|
10699 |
|
10700 | const createStrictInequality: (left: Expression, right: Expression) => BinaryExpression;
|
10701 |
|
10702 | const createAdd: (left: Expression, right: Expression) => BinaryExpression;
|
10703 |
|
10704 | const createSubtract: (left: Expression, right: Expression) => BinaryExpression;
|
10705 |
|
10706 | const createLogicalAnd: (left: Expression, right: Expression) => BinaryExpression;
|
10707 |
|
10708 | const createLogicalOr: (left: Expression, right: Expression) => BinaryExpression;
|
10709 |
|
10710 | const createPostfixIncrement: (operand: Expression) => PostfixUnaryExpression;
|
10711 |
|
10712 | const createLogicalNot: (operand: Expression) => PrefixUnaryExpression;
|
10713 |
|
10714 | const createNode: (kind: SyntaxKind, pos?: any, end?: any) => Node;
|
10715 | |
10716 |
|
10717 |
|
10718 |
|
10719 |
|
10720 |
|
10721 |
|
10722 |
|
10723 | const getMutableClone: <T extends Node>(node: T) => T;
|
10724 |
|
10725 | const isTypeAssertion: (node: Node) => node is TypeAssertion;
|
10726 | |
10727 |
|
10728 |
|
10729 | interface ReadonlyMap<T> extends ReadonlyESMap<string, T> {
|
10730 | }
|
10731 | |
10732 |
|
10733 |
|
10734 | interface Map<T> extends ESMap<string, T> {
|
10735 | }
|
10736 | }
|
10737 |
|
10738 | export = ts;
|
10739 | export as namespace ts; |
\ | No newline at end of file |