@schematics/angular 14.0.0-next.9 → 14.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app-shell/index.js +4 -8
- package/app-shell/schema.json +0 -3
- package/application/files/src/test.ts.template +1 -1
- package/application/index.js +3 -3
- package/class/schema.json +3 -0
- package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template +1 -1
- package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template +5 -2
- package/component/index.js +9 -14
- package/component/schema.d.ts +4 -0
- package/component/schema.json +9 -0
- package/directive/files/__name@dasherize@if-flat__/__name@dasherize__.directive.ts.template +2 -1
- package/directive/index.js +9 -18
- package/directive/schema.d.ts +4 -0
- package/directive/schema.json +9 -0
- package/e2e/index.js +5 -5
- package/enum/schema.json +3 -0
- package/guard/schema.json +3 -0
- package/interceptor/schema.json +3 -0
- package/interface/schema.json +3 -0
- package/library/files/src/test.ts.template +1 -1
- package/library/index.js +3 -4
- package/migrations/migration-collection.json +5 -0
- package/migrations/update-14/update-libraries-secondary-entrypoints.d.ts +10 -0
- package/migrations/update-14/update-libraries-secondary-entrypoints.js +51 -0
- package/module/index.js +8 -16
- package/module/schema.json +3 -0
- package/package.json +10 -3
- package/pipe/files/__name@dasherize@if-flat__/__name@dasherize__.pipe.ts.template +2 -1
- package/pipe/index.js +8 -17
- package/pipe/schema.d.ts +4 -0
- package/pipe/schema.json +9 -0
- package/resolver/schema.json +3 -0
- package/service/schema.json +3 -1
- package/service-worker/index.js +4 -8
- package/third_party/github.com/Microsoft/TypeScript/BUILD.bazel +4 -4
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts +402 -295
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.js +23181 -20448
- package/universal/index.js +3 -7
- package/utility/dependency.d.ts +45 -0
- package/utility/dependency.js +97 -0
- package/utility/find-module.d.ts +1 -0
- package/utility/find-module.js +1 -2
- package/utility/generate-from-files.js +2 -3
- package/utility/index.d.ts +10 -0
- package/utility/index.js +21 -0
- package/utility/json-file.js +1 -7
- package/utility/latest-versions/package.json +4 -3
- package/utility/latest-versions.js +1 -1
- package/utility/ng-ast-utils.js +2 -10
- package/utility/parse-name.js +0 -1
- package/utility/validation.js +1 -3
- package/utility/workspace-models.d.ts +6 -0
- package/utility/workspace-models.js +6 -0
- package/utility/workspace.d.ts +36 -3
- package/utility/workspace.js +70 -34
- package/web-worker/index.js +2 -2
- package/web-worker/schema.json +3 -0
- package/workspace/index.js +1 -2
|
@@ -14,7 +14,7 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
declare namespace ts {
|
|
17
|
-
const versionMajorMinor = "4.
|
|
17
|
+
const versionMajorMinor = "4.7";
|
|
18
18
|
/** The version of the TypeScript compiler release */
|
|
19
19
|
const version: string;
|
|
20
20
|
/**
|
|
@@ -249,216 +249,219 @@ declare namespace ts {
|
|
|
249
249
|
ModuleKeyword = 141,
|
|
250
250
|
NamespaceKeyword = 142,
|
|
251
251
|
NeverKeyword = 143,
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
252
|
+
OutKeyword = 144,
|
|
253
|
+
ReadonlyKeyword = 145,
|
|
254
|
+
RequireKeyword = 146,
|
|
255
|
+
NumberKeyword = 147,
|
|
256
|
+
ObjectKeyword = 148,
|
|
257
|
+
SetKeyword = 149,
|
|
258
|
+
StringKeyword = 150,
|
|
259
|
+
SymbolKeyword = 151,
|
|
260
|
+
TypeKeyword = 152,
|
|
261
|
+
UndefinedKeyword = 153,
|
|
262
|
+
UniqueKeyword = 154,
|
|
263
|
+
UnknownKeyword = 155,
|
|
264
|
+
FromKeyword = 156,
|
|
265
|
+
GlobalKeyword = 157,
|
|
266
|
+
BigIntKeyword = 158,
|
|
267
|
+
OverrideKeyword = 159,
|
|
268
|
+
OfKeyword = 160,
|
|
269
|
+
QualifiedName = 161,
|
|
270
|
+
ComputedPropertyName = 162,
|
|
271
|
+
TypeParameter = 163,
|
|
272
|
+
Parameter = 164,
|
|
273
|
+
Decorator = 165,
|
|
274
|
+
PropertySignature = 166,
|
|
275
|
+
PropertyDeclaration = 167,
|
|
276
|
+
MethodSignature = 168,
|
|
277
|
+
MethodDeclaration = 169,
|
|
278
|
+
ClassStaticBlockDeclaration = 170,
|
|
279
|
+
Constructor = 171,
|
|
280
|
+
GetAccessor = 172,
|
|
281
|
+
SetAccessor = 173,
|
|
282
|
+
CallSignature = 174,
|
|
283
|
+
ConstructSignature = 175,
|
|
284
|
+
IndexSignature = 176,
|
|
285
|
+
TypePredicate = 177,
|
|
286
|
+
TypeReference = 178,
|
|
287
|
+
FunctionType = 179,
|
|
288
|
+
ConstructorType = 180,
|
|
289
|
+
TypeQuery = 181,
|
|
290
|
+
TypeLiteral = 182,
|
|
291
|
+
ArrayType = 183,
|
|
292
|
+
TupleType = 184,
|
|
293
|
+
OptionalType = 185,
|
|
294
|
+
RestType = 186,
|
|
295
|
+
UnionType = 187,
|
|
296
|
+
IntersectionType = 188,
|
|
297
|
+
ConditionalType = 189,
|
|
298
|
+
InferType = 190,
|
|
299
|
+
ParenthesizedType = 191,
|
|
300
|
+
ThisType = 192,
|
|
301
|
+
TypeOperator = 193,
|
|
302
|
+
IndexedAccessType = 194,
|
|
303
|
+
MappedType = 195,
|
|
304
|
+
LiteralType = 196,
|
|
305
|
+
NamedTupleMember = 197,
|
|
306
|
+
TemplateLiteralType = 198,
|
|
307
|
+
TemplateLiteralTypeSpan = 199,
|
|
308
|
+
ImportType = 200,
|
|
309
|
+
ObjectBindingPattern = 201,
|
|
310
|
+
ArrayBindingPattern = 202,
|
|
311
|
+
BindingElement = 203,
|
|
312
|
+
ArrayLiteralExpression = 204,
|
|
313
|
+
ObjectLiteralExpression = 205,
|
|
314
|
+
PropertyAccessExpression = 206,
|
|
315
|
+
ElementAccessExpression = 207,
|
|
316
|
+
CallExpression = 208,
|
|
317
|
+
NewExpression = 209,
|
|
318
|
+
TaggedTemplateExpression = 210,
|
|
319
|
+
TypeAssertionExpression = 211,
|
|
320
|
+
ParenthesizedExpression = 212,
|
|
321
|
+
FunctionExpression = 213,
|
|
322
|
+
ArrowFunction = 214,
|
|
323
|
+
DeleteExpression = 215,
|
|
324
|
+
TypeOfExpression = 216,
|
|
325
|
+
VoidExpression = 217,
|
|
326
|
+
AwaitExpression = 218,
|
|
327
|
+
PrefixUnaryExpression = 219,
|
|
328
|
+
PostfixUnaryExpression = 220,
|
|
329
|
+
BinaryExpression = 221,
|
|
330
|
+
ConditionalExpression = 222,
|
|
331
|
+
TemplateExpression = 223,
|
|
332
|
+
YieldExpression = 224,
|
|
333
|
+
SpreadElement = 225,
|
|
334
|
+
ClassExpression = 226,
|
|
335
|
+
OmittedExpression = 227,
|
|
336
|
+
ExpressionWithTypeArguments = 228,
|
|
337
|
+
AsExpression = 229,
|
|
338
|
+
NonNullExpression = 230,
|
|
339
|
+
MetaProperty = 231,
|
|
340
|
+
SyntheticExpression = 232,
|
|
341
|
+
TemplateSpan = 233,
|
|
342
|
+
SemicolonClassElement = 234,
|
|
343
|
+
Block = 235,
|
|
344
|
+
EmptyStatement = 236,
|
|
345
|
+
VariableStatement = 237,
|
|
346
|
+
ExpressionStatement = 238,
|
|
347
|
+
IfStatement = 239,
|
|
348
|
+
DoStatement = 240,
|
|
349
|
+
WhileStatement = 241,
|
|
350
|
+
ForStatement = 242,
|
|
351
|
+
ForInStatement = 243,
|
|
352
|
+
ForOfStatement = 244,
|
|
353
|
+
ContinueStatement = 245,
|
|
354
|
+
BreakStatement = 246,
|
|
355
|
+
ReturnStatement = 247,
|
|
356
|
+
WithStatement = 248,
|
|
357
|
+
SwitchStatement = 249,
|
|
358
|
+
LabeledStatement = 250,
|
|
359
|
+
ThrowStatement = 251,
|
|
360
|
+
TryStatement = 252,
|
|
361
|
+
DebuggerStatement = 253,
|
|
362
|
+
VariableDeclaration = 254,
|
|
363
|
+
VariableDeclarationList = 255,
|
|
364
|
+
FunctionDeclaration = 256,
|
|
365
|
+
ClassDeclaration = 257,
|
|
366
|
+
InterfaceDeclaration = 258,
|
|
367
|
+
TypeAliasDeclaration = 259,
|
|
368
|
+
EnumDeclaration = 260,
|
|
369
|
+
ModuleDeclaration = 261,
|
|
370
|
+
ModuleBlock = 262,
|
|
371
|
+
CaseBlock = 263,
|
|
372
|
+
NamespaceExportDeclaration = 264,
|
|
373
|
+
ImportEqualsDeclaration = 265,
|
|
374
|
+
ImportDeclaration = 266,
|
|
375
|
+
ImportClause = 267,
|
|
376
|
+
NamespaceImport = 268,
|
|
377
|
+
NamedImports = 269,
|
|
378
|
+
ImportSpecifier = 270,
|
|
379
|
+
ExportAssignment = 271,
|
|
380
|
+
ExportDeclaration = 272,
|
|
381
|
+
NamedExports = 273,
|
|
382
|
+
NamespaceExport = 274,
|
|
383
|
+
ExportSpecifier = 275,
|
|
384
|
+
MissingDeclaration = 276,
|
|
385
|
+
ExternalModuleReference = 277,
|
|
386
|
+
JsxElement = 278,
|
|
387
|
+
JsxSelfClosingElement = 279,
|
|
388
|
+
JsxOpeningElement = 280,
|
|
389
|
+
JsxClosingElement = 281,
|
|
390
|
+
JsxFragment = 282,
|
|
391
|
+
JsxOpeningFragment = 283,
|
|
392
|
+
JsxClosingFragment = 284,
|
|
393
|
+
JsxAttribute = 285,
|
|
394
|
+
JsxAttributes = 286,
|
|
395
|
+
JsxSpreadAttribute = 287,
|
|
396
|
+
JsxExpression = 288,
|
|
397
|
+
CaseClause = 289,
|
|
398
|
+
DefaultClause = 290,
|
|
399
|
+
HeritageClause = 291,
|
|
400
|
+
CatchClause = 292,
|
|
401
|
+
AssertClause = 293,
|
|
402
|
+
AssertEntry = 294,
|
|
403
|
+
ImportTypeAssertionContainer = 295,
|
|
404
|
+
PropertyAssignment = 296,
|
|
405
|
+
ShorthandPropertyAssignment = 297,
|
|
406
|
+
SpreadAssignment = 298,
|
|
407
|
+
EnumMember = 299,
|
|
408
|
+
UnparsedPrologue = 300,
|
|
409
|
+
UnparsedPrepend = 301,
|
|
410
|
+
UnparsedText = 302,
|
|
411
|
+
UnparsedInternalText = 303,
|
|
412
|
+
UnparsedSyntheticReference = 304,
|
|
413
|
+
SourceFile = 305,
|
|
414
|
+
Bundle = 306,
|
|
415
|
+
UnparsedSource = 307,
|
|
416
|
+
InputFiles = 308,
|
|
417
|
+
JSDocTypeExpression = 309,
|
|
418
|
+
JSDocNameReference = 310,
|
|
419
|
+
JSDocMemberName = 311,
|
|
420
|
+
JSDocAllType = 312,
|
|
421
|
+
JSDocUnknownType = 313,
|
|
422
|
+
JSDocNullableType = 314,
|
|
423
|
+
JSDocNonNullableType = 315,
|
|
424
|
+
JSDocOptionalType = 316,
|
|
425
|
+
JSDocFunctionType = 317,
|
|
426
|
+
JSDocVariadicType = 318,
|
|
427
|
+
JSDocNamepathType = 319,
|
|
428
|
+
/** @deprecated Use SyntaxKind.JSDoc */
|
|
429
|
+
JSDocComment = 320,
|
|
430
|
+
JSDocText = 321,
|
|
431
|
+
JSDocTypeLiteral = 322,
|
|
432
|
+
JSDocSignature = 323,
|
|
433
|
+
JSDocLink = 324,
|
|
434
|
+
JSDocLinkCode = 325,
|
|
435
|
+
JSDocLinkPlain = 326,
|
|
436
|
+
JSDocTag = 327,
|
|
437
|
+
JSDocAugmentsTag = 328,
|
|
438
|
+
JSDocImplementsTag = 329,
|
|
439
|
+
JSDocAuthorTag = 330,
|
|
440
|
+
JSDocDeprecatedTag = 331,
|
|
441
|
+
JSDocClassTag = 332,
|
|
442
|
+
JSDocPublicTag = 333,
|
|
443
|
+
JSDocPrivateTag = 334,
|
|
444
|
+
JSDocProtectedTag = 335,
|
|
445
|
+
JSDocReadonlyTag = 336,
|
|
446
|
+
JSDocOverrideTag = 337,
|
|
447
|
+
JSDocCallbackTag = 338,
|
|
448
|
+
JSDocEnumTag = 339,
|
|
449
|
+
JSDocParameterTag = 340,
|
|
450
|
+
JSDocReturnTag = 341,
|
|
451
|
+
JSDocThisTag = 342,
|
|
452
|
+
JSDocTypeTag = 343,
|
|
453
|
+
JSDocTemplateTag = 344,
|
|
454
|
+
JSDocTypedefTag = 345,
|
|
455
|
+
JSDocSeeTag = 346,
|
|
456
|
+
JSDocPropertyTag = 347,
|
|
457
|
+
SyntaxList = 348,
|
|
458
|
+
NotEmittedStatement = 349,
|
|
459
|
+
PartiallyEmittedExpression = 350,
|
|
460
|
+
CommaListExpression = 351,
|
|
461
|
+
MergeDeclarationMarker = 352,
|
|
462
|
+
EndOfDeclarationMarker = 353,
|
|
463
|
+
SyntheticReferenceExpression = 354,
|
|
464
|
+
Count = 355,
|
|
462
465
|
FirstAssignment = 63,
|
|
463
466
|
LastAssignment = 78,
|
|
464
467
|
FirstCompoundAssignment = 64,
|
|
@@ -466,15 +469,15 @@ declare namespace ts {
|
|
|
466
469
|
FirstReservedWord = 81,
|
|
467
470
|
LastReservedWord = 116,
|
|
468
471
|
FirstKeyword = 81,
|
|
469
|
-
LastKeyword =
|
|
472
|
+
LastKeyword = 160,
|
|
470
473
|
FirstFutureReservedWord = 117,
|
|
471
474
|
LastFutureReservedWord = 125,
|
|
472
|
-
FirstTypeNode =
|
|
473
|
-
LastTypeNode =
|
|
475
|
+
FirstTypeNode = 177,
|
|
476
|
+
LastTypeNode = 200,
|
|
474
477
|
FirstPunctuation = 18,
|
|
475
478
|
LastPunctuation = 78,
|
|
476
479
|
FirstToken = 0,
|
|
477
|
-
LastToken =
|
|
480
|
+
LastToken = 160,
|
|
478
481
|
FirstTriviaToken = 2,
|
|
479
482
|
LastTriviaToken = 7,
|
|
480
483
|
FirstLiteralToken = 8,
|
|
@@ -483,20 +486,21 @@ declare namespace ts {
|
|
|
483
486
|
LastTemplateToken = 17,
|
|
484
487
|
FirstBinaryOperator = 29,
|
|
485
488
|
LastBinaryOperator = 78,
|
|
486
|
-
FirstStatement =
|
|
487
|
-
LastStatement =
|
|
488
|
-
FirstNode =
|
|
489
|
-
FirstJSDocNode =
|
|
490
|
-
LastJSDocNode =
|
|
491
|
-
FirstJSDocTagNode =
|
|
492
|
-
LastJSDocTagNode =
|
|
489
|
+
FirstStatement = 237,
|
|
490
|
+
LastStatement = 253,
|
|
491
|
+
FirstNode = 161,
|
|
492
|
+
FirstJSDocNode = 309,
|
|
493
|
+
LastJSDocNode = 347,
|
|
494
|
+
FirstJSDocTagNode = 327,
|
|
495
|
+
LastJSDocTagNode = 347,
|
|
496
|
+
JSDoc = 320
|
|
493
497
|
}
|
|
494
498
|
export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
|
|
495
499
|
export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
|
|
496
500
|
export type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail;
|
|
497
501
|
export type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken;
|
|
498
|
-
export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OverrideKeyword | 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;
|
|
499
|
-
export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword;
|
|
502
|
+
export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.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;
|
|
503
|
+
export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword;
|
|
500
504
|
export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword;
|
|
501
505
|
export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind;
|
|
502
506
|
export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken;
|
|
@@ -519,16 +523,17 @@ declare namespace ts {
|
|
|
519
523
|
YieldContext = 8192,
|
|
520
524
|
DecoratorContext = 16384,
|
|
521
525
|
AwaitContext = 32768,
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
526
|
+
DisallowConditionalTypesContext = 65536,
|
|
527
|
+
ThisNodeHasError = 131072,
|
|
528
|
+
JavaScriptFile = 262144,
|
|
529
|
+
ThisNodeOrAnySubNodesHasError = 524288,
|
|
530
|
+
HasAggregatedChildData = 1048576,
|
|
531
|
+
JSDoc = 8388608,
|
|
532
|
+
JsonFile = 67108864,
|
|
528
533
|
BlockScoped = 3,
|
|
529
534
|
ReachabilityCheckFlags = 768,
|
|
530
535
|
ReachabilityAndEmitFlags = 2816,
|
|
531
|
-
ContextFlags =
|
|
536
|
+
ContextFlags = 50720768,
|
|
532
537
|
TypeExcludesFlags = 40960,
|
|
533
538
|
}
|
|
534
539
|
export enum ModifierFlags {
|
|
@@ -547,13 +552,15 @@ declare namespace ts {
|
|
|
547
552
|
HasComputedJSDocModifiers = 4096,
|
|
548
553
|
Deprecated = 8192,
|
|
549
554
|
Override = 16384,
|
|
555
|
+
In = 32768,
|
|
556
|
+
Out = 65536,
|
|
550
557
|
HasComputedFlags = 536870912,
|
|
551
558
|
AccessibilityModifier = 28,
|
|
552
559
|
ParameterPropertyModifier = 16476,
|
|
553
560
|
NonPublicAccessibilityModifier = 24,
|
|
554
|
-
TypeScriptModifier =
|
|
561
|
+
TypeScriptModifier = 116958,
|
|
555
562
|
ExportDefault = 513,
|
|
556
|
-
All =
|
|
563
|
+
All = 125951
|
|
557
564
|
}
|
|
558
565
|
export enum JsxFlags {
|
|
559
566
|
None = 0,
|
|
@@ -572,7 +579,7 @@ declare namespace ts {
|
|
|
572
579
|
}
|
|
573
580
|
export interface JSDocContainer {
|
|
574
581
|
}
|
|
575
|
-
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | EndOfFileToken;
|
|
582
|
+
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | CaseClause | EndOfFileToken;
|
|
576
583
|
export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
|
|
577
584
|
export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
|
|
578
585
|
export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
|
|
@@ -614,15 +621,17 @@ declare namespace ts {
|
|
|
614
621
|
export type DeclareKeyword = ModifierToken<SyntaxKind.DeclareKeyword>;
|
|
615
622
|
export type DefaultKeyword = ModifierToken<SyntaxKind.DefaultKeyword>;
|
|
616
623
|
export type ExportKeyword = ModifierToken<SyntaxKind.ExportKeyword>;
|
|
624
|
+
export type InKeyword = ModifierToken<SyntaxKind.InKeyword>;
|
|
617
625
|
export type PrivateKeyword = ModifierToken<SyntaxKind.PrivateKeyword>;
|
|
618
626
|
export type ProtectedKeyword = ModifierToken<SyntaxKind.ProtectedKeyword>;
|
|
619
627
|
export type PublicKeyword = ModifierToken<SyntaxKind.PublicKeyword>;
|
|
620
628
|
export type ReadonlyKeyword = ModifierToken<SyntaxKind.ReadonlyKeyword>;
|
|
629
|
+
export type OutKeyword = ModifierToken<SyntaxKind.OutKeyword>;
|
|
621
630
|
export type OverrideKeyword = ModifierToken<SyntaxKind.OverrideKeyword>;
|
|
622
631
|
export type StaticKeyword = ModifierToken<SyntaxKind.StaticKeyword>;
|
|
623
632
|
/** @deprecated Use `ReadonlyKeyword` instead. */
|
|
624
633
|
export type ReadonlyToken = ReadonlyKeyword;
|
|
625
|
-
export type Modifier = AbstractKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | OverrideKeyword | ReadonlyKeyword | StaticKeyword;
|
|
634
|
+
export type Modifier = AbstractKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | InKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | OutKeyword | OverrideKeyword | ReadonlyKeyword | StaticKeyword;
|
|
626
635
|
export type AccessibilityModifier = PublicKeyword | PrivateKeyword | ProtectedKeyword;
|
|
627
636
|
export type ParameterPropertyModifier = AccessibilityModifier | ReadonlyKeyword;
|
|
628
637
|
export type ClassMemberModifier = AccessibilityModifier | ReadonlyKeyword | StaticKeyword;
|
|
@@ -866,10 +875,17 @@ declare namespace ts {
|
|
|
866
875
|
export interface KeywordTypeNode<TKind extends KeywordTypeSyntaxKind = KeywordTypeSyntaxKind> extends KeywordToken<TKind>, TypeNode {
|
|
867
876
|
readonly kind: TKind;
|
|
868
877
|
}
|
|
878
|
+
export interface ImportTypeAssertionContainer extends Node {
|
|
879
|
+
readonly kind: SyntaxKind.ImportTypeAssertionContainer;
|
|
880
|
+
readonly parent: ImportTypeNode;
|
|
881
|
+
readonly assertClause: AssertClause;
|
|
882
|
+
readonly multiLine?: boolean;
|
|
883
|
+
}
|
|
869
884
|
export interface ImportTypeNode extends NodeWithTypeArguments {
|
|
870
885
|
readonly kind: SyntaxKind.ImportType;
|
|
871
886
|
readonly isTypeOf: boolean;
|
|
872
887
|
readonly argument: TypeNode;
|
|
888
|
+
readonly assertions?: ImportTypeAssertionContainer;
|
|
873
889
|
readonly qualifier?: EntityName;
|
|
874
890
|
}
|
|
875
891
|
export interface ThisTypeNode extends TypeNode {
|
|
@@ -901,7 +917,7 @@ declare namespace ts {
|
|
|
901
917
|
readonly parameterName: Identifier | ThisTypeNode;
|
|
902
918
|
readonly type?: TypeNode;
|
|
903
919
|
}
|
|
904
|
-
export interface TypeQueryNode extends
|
|
920
|
+
export interface TypeQueryNode extends NodeWithTypeArguments {
|
|
905
921
|
readonly kind: SyntaxKind.TypeQuery;
|
|
906
922
|
readonly exprName: EntityName;
|
|
907
923
|
}
|
|
@@ -1285,9 +1301,8 @@ declare namespace ts {
|
|
|
1285
1301
|
export interface ImportCall extends CallExpression {
|
|
1286
1302
|
readonly expression: ImportExpression;
|
|
1287
1303
|
}
|
|
1288
|
-
export interface ExpressionWithTypeArguments extends NodeWithTypeArguments {
|
|
1304
|
+
export interface ExpressionWithTypeArguments extends MemberExpression, NodeWithTypeArguments {
|
|
1289
1305
|
readonly kind: SyntaxKind.ExpressionWithTypeArguments;
|
|
1290
|
-
readonly parent: HeritageClause | JSDocAugmentsTag | JSDocImplementsTag;
|
|
1291
1306
|
readonly expression: LeftHandSideExpression;
|
|
1292
1307
|
}
|
|
1293
1308
|
export interface NewExpression extends PrimaryExpression, Declaration {
|
|
@@ -1498,7 +1513,7 @@ declare namespace ts {
|
|
|
1498
1513
|
readonly parent: SwitchStatement;
|
|
1499
1514
|
readonly clauses: NodeArray<CaseOrDefaultClause>;
|
|
1500
1515
|
}
|
|
1501
|
-
export interface CaseClause extends Node {
|
|
1516
|
+
export interface CaseClause extends Node, JSDocContainer {
|
|
1502
1517
|
readonly kind: SyntaxKind.CaseClause;
|
|
1503
1518
|
readonly parent: CaseBlock;
|
|
1504
1519
|
readonly expression: Expression;
|
|
@@ -1749,6 +1764,7 @@ declare namespace ts {
|
|
|
1749
1764
|
}
|
|
1750
1765
|
export interface FileReference extends TextRange {
|
|
1751
1766
|
fileName: string;
|
|
1767
|
+
resolutionMode?: SourceFile["impliedNodeFormat"];
|
|
1752
1768
|
}
|
|
1753
1769
|
export interface CheckJsDirective extends TextRange {
|
|
1754
1770
|
enabled: boolean;
|
|
@@ -1790,10 +1806,12 @@ declare namespace ts {
|
|
|
1790
1806
|
export interface JSDocNonNullableType extends JSDocType {
|
|
1791
1807
|
readonly kind: SyntaxKind.JSDocNonNullableType;
|
|
1792
1808
|
readonly type: TypeNode;
|
|
1809
|
+
readonly postfix: boolean;
|
|
1793
1810
|
}
|
|
1794
1811
|
export interface JSDocNullableType extends JSDocType {
|
|
1795
1812
|
readonly kind: SyntaxKind.JSDocNullableType;
|
|
1796
1813
|
readonly type: TypeNode;
|
|
1814
|
+
readonly postfix: boolean;
|
|
1797
1815
|
}
|
|
1798
1816
|
export interface JSDocOptionalType extends JSDocType {
|
|
1799
1817
|
readonly kind: SyntaxKind.JSDocOptionalType;
|
|
@@ -1812,7 +1830,7 @@ declare namespace ts {
|
|
|
1812
1830
|
}
|
|
1813
1831
|
export type JSDocTypeReferencingNode = JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType;
|
|
1814
1832
|
export interface JSDoc extends Node {
|
|
1815
|
-
readonly kind: SyntaxKind.
|
|
1833
|
+
readonly kind: SyntaxKind.JSDoc;
|
|
1816
1834
|
readonly parent: HasJSDoc;
|
|
1817
1835
|
readonly tags?: NodeArray<JSDocTag>;
|
|
1818
1836
|
readonly comment?: string | NodeArray<JSDocComment>;
|
|
@@ -1968,7 +1986,7 @@ declare namespace ts {
|
|
|
1968
1986
|
Label = 12,
|
|
1969
1987
|
Condition = 96
|
|
1970
1988
|
}
|
|
1971
|
-
export type FlowNode = FlowStart | FlowLabel | FlowAssignment |
|
|
1989
|
+
export type FlowNode = FlowStart | FlowLabel | FlowAssignment | FlowCondition | FlowSwitchClause | FlowArrayMutation | FlowCall | FlowReduceLabel;
|
|
1972
1990
|
export interface FlowNodeBase {
|
|
1973
1991
|
flags: FlowFlags;
|
|
1974
1992
|
id?: number;
|
|
@@ -2015,6 +2033,12 @@ declare namespace ts {
|
|
|
2015
2033
|
path: string;
|
|
2016
2034
|
name?: string;
|
|
2017
2035
|
}
|
|
2036
|
+
/**
|
|
2037
|
+
* Subset of properties from SourceFile that are used in multiple utility functions
|
|
2038
|
+
*/
|
|
2039
|
+
export interface SourceFileLike {
|
|
2040
|
+
readonly text: string;
|
|
2041
|
+
}
|
|
2018
2042
|
export interface SourceFile extends Declaration {
|
|
2019
2043
|
readonly kind: SyntaxKind.SourceFile;
|
|
2020
2044
|
readonly statements: NodeArray<Statement>;
|
|
@@ -2039,7 +2063,7 @@ declare namespace ts {
|
|
|
2039
2063
|
hasNoDefaultLib: boolean;
|
|
2040
2064
|
languageVersion: ScriptTarget;
|
|
2041
2065
|
/**
|
|
2042
|
-
* When `module` is `
|
|
2066
|
+
* When `module` is `Node16` or `NodeNext`, this field controls whether the
|
|
2043
2067
|
* source file in question is an ESNext-output-format file, or a CommonJS-output-format
|
|
2044
2068
|
* module. This is derived by the module resolver as it looks up the file, since
|
|
2045
2069
|
* it is derived from either the file extension of the module, or the containing
|
|
@@ -2074,7 +2098,7 @@ declare namespace ts {
|
|
|
2074
2098
|
readonly prologues: readonly UnparsedPrologue[];
|
|
2075
2099
|
helpers: readonly UnscopedEmitHelper[] | undefined;
|
|
2076
2100
|
referencedFiles: readonly FileReference[];
|
|
2077
|
-
typeReferenceDirectives: readonly
|
|
2101
|
+
typeReferenceDirectives: readonly FileReference[] | undefined;
|
|
2078
2102
|
libReferenceDirectives: readonly FileReference[];
|
|
2079
2103
|
hasNoDefaultLib?: boolean;
|
|
2080
2104
|
sourceMapPath?: string;
|
|
@@ -2148,7 +2172,9 @@ declare namespace ts {
|
|
|
2148
2172
|
export type ResolvedConfigFileName = string & {
|
|
2149
2173
|
_isResolvedConfigFileName: never;
|
|
2150
2174
|
};
|
|
2151
|
-
export
|
|
2175
|
+
export interface WriteFileCallbackData {
|
|
2176
|
+
}
|
|
2177
|
+
export type WriteFileCallback = (fileName: string, text: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[], data?: WriteFileCallbackData) => void;
|
|
2152
2178
|
export class OperationCanceledException {
|
|
2153
2179
|
}
|
|
2154
2180
|
export interface CancellationToken {
|
|
@@ -2370,7 +2396,6 @@ declare namespace ts {
|
|
|
2370
2396
|
UseAliasDefinedOutsideCurrentScope = 16384,
|
|
2371
2397
|
UseSingleQuotesForStringLiteralType = 268435456,
|
|
2372
2398
|
NoTypeReduction = 536870912,
|
|
2373
|
-
NoUndefinedOptionalParameterType = 1073741824,
|
|
2374
2399
|
AllowThisInObjectLiteral = 32768,
|
|
2375
2400
|
AllowQualifiedNameInPlaceOfIdentifier = 65536,
|
|
2376
2401
|
/** @deprecated AllowQualifedNameInPlaceOfIdentifier. Use AllowQualifiedNameInPlaceOfIdentifier instead. */
|
|
@@ -2654,13 +2679,13 @@ declare namespace ts {
|
|
|
2654
2679
|
ObjectLiteralPatternWithComputedProperties = 512,
|
|
2655
2680
|
ReverseMapped = 1024,
|
|
2656
2681
|
JsxAttributes = 2048,
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
ArrayLiteral = 32768,
|
|
2682
|
+
JSLiteral = 4096,
|
|
2683
|
+
FreshLiteral = 8192,
|
|
2684
|
+
ArrayLiteral = 16384,
|
|
2661
2685
|
ClassOrInterface = 3,
|
|
2662
|
-
ContainsSpread =
|
|
2663
|
-
ObjectRestType =
|
|
2686
|
+
ContainsSpread = 2097152,
|
|
2687
|
+
ObjectRestType = 4194304,
|
|
2688
|
+
InstantiationExpressionType = 8388608,
|
|
2664
2689
|
}
|
|
2665
2690
|
export interface ObjectType extends Type {
|
|
2666
2691
|
objectFlags: ObjectFlags;
|
|
@@ -2868,9 +2893,23 @@ declare namespace ts {
|
|
|
2868
2893
|
export enum ModuleResolutionKind {
|
|
2869
2894
|
Classic = 1,
|
|
2870
2895
|
NodeJs = 2,
|
|
2871
|
-
|
|
2896
|
+
Node16 = 3,
|
|
2872
2897
|
NodeNext = 99
|
|
2873
2898
|
}
|
|
2899
|
+
export enum ModuleDetectionKind {
|
|
2900
|
+
/**
|
|
2901
|
+
* Files with imports, exports and/or import.meta are considered modules
|
|
2902
|
+
*/
|
|
2903
|
+
Legacy = 1,
|
|
2904
|
+
/**
|
|
2905
|
+
* Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node16+
|
|
2906
|
+
*/
|
|
2907
|
+
Auto = 2,
|
|
2908
|
+
/**
|
|
2909
|
+
* Consider all non-declaration files modules, regardless of present syntax
|
|
2910
|
+
*/
|
|
2911
|
+
Force = 3
|
|
2912
|
+
}
|
|
2874
2913
|
export interface PluginImport {
|
|
2875
2914
|
name: string;
|
|
2876
2915
|
}
|
|
@@ -2942,6 +2981,8 @@ declare namespace ts {
|
|
|
2942
2981
|
maxNodeModuleJsDepth?: number;
|
|
2943
2982
|
module?: ModuleKind;
|
|
2944
2983
|
moduleResolution?: ModuleResolutionKind;
|
|
2984
|
+
moduleSuffixes?: string[];
|
|
2985
|
+
moduleDetection?: ModuleDetectionKind;
|
|
2945
2986
|
newLine?: NewLineKind;
|
|
2946
2987
|
noEmit?: boolean;
|
|
2947
2988
|
noEmitHelpers?: boolean;
|
|
@@ -3033,7 +3074,7 @@ declare namespace ts {
|
|
|
3033
3074
|
ES2020 = 6,
|
|
3034
3075
|
ES2022 = 7,
|
|
3035
3076
|
ESNext = 99,
|
|
3036
|
-
|
|
3077
|
+
Node16 = 100,
|
|
3037
3078
|
NodeNext = 199
|
|
3038
3079
|
}
|
|
3039
3080
|
export enum JsxEmit {
|
|
@@ -3127,7 +3168,14 @@ declare namespace ts {
|
|
|
3127
3168
|
realpath?(path: string): string;
|
|
3128
3169
|
getCurrentDirectory?(): string;
|
|
3129
3170
|
getDirectories?(path: string): string[];
|
|
3130
|
-
useCaseSensitiveFileNames?: boolean | (() => boolean);
|
|
3171
|
+
useCaseSensitiveFileNames?: boolean | (() => boolean) | undefined;
|
|
3172
|
+
}
|
|
3173
|
+
/**
|
|
3174
|
+
* Used by services to specify the minimum host area required to set up source files under any compilation settings
|
|
3175
|
+
*/
|
|
3176
|
+
export interface MinimalResolutionCacheHost extends ModuleResolutionHost {
|
|
3177
|
+
getCompilationSettings(): CompilerOptions;
|
|
3178
|
+
getCompilerHost?(): CompilerHost | undefined;
|
|
3131
3179
|
}
|
|
3132
3180
|
/**
|
|
3133
3181
|
* Represents the result of module resolution.
|
|
@@ -3204,8 +3252,8 @@ declare namespace ts {
|
|
|
3204
3252
|
readonly failedLookupLocations: string[];
|
|
3205
3253
|
}
|
|
3206
3254
|
export interface CompilerHost extends ModuleResolutionHost {
|
|
3207
|
-
getSourceFile(fileName: string,
|
|
3208
|
-
getSourceFileByPath?(fileName: string, path: Path,
|
|
3255
|
+
getSourceFile(fileName: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
|
|
3256
|
+
getSourceFileByPath?(fileName: string, path: Path, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
|
|
3209
3257
|
getCancellationToken?(): CancellationToken;
|
|
3210
3258
|
getDefaultLibFileName(options: CompilerOptions): string;
|
|
3211
3259
|
getDefaultLibLocation?(): string;
|
|
@@ -3223,7 +3271,7 @@ declare namespace ts {
|
|
|
3223
3271
|
/**
|
|
3224
3272
|
* This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
|
|
3225
3273
|
*/
|
|
3226
|
-
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
|
|
3274
|
+
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[];
|
|
3227
3275
|
getEnvironmentVariable?(name: string): string | undefined;
|
|
3228
3276
|
createHash?(data: string): string;
|
|
3229
3277
|
getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
|
|
@@ -3353,7 +3401,11 @@ declare namespace ts {
|
|
|
3353
3401
|
updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName;
|
|
3354
3402
|
createComputedPropertyName(expression: Expression): ComputedPropertyName;
|
|
3355
3403
|
updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName;
|
|
3404
|
+
createTypeParameterDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration;
|
|
3405
|
+
/** @deprecated */
|
|
3356
3406
|
createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration;
|
|
3407
|
+
updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
|
|
3408
|
+
/** @deprecated */
|
|
3357
3409
|
updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
|
|
3358
3410
|
createParameterDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration;
|
|
3359
3411
|
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;
|
|
@@ -3396,8 +3448,8 @@ declare namespace ts {
|
|
|
3396
3448
|
updateConstructorTypeNode(node: ConstructorTypeNode, modifiers: readonly Modifier[] | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode;
|
|
3397
3449
|
/** @deprecated */
|
|
3398
3450
|
updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode;
|
|
3399
|
-
createTypeQueryNode(exprName: EntityName): TypeQueryNode;
|
|
3400
|
-
updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName): TypeQueryNode;
|
|
3451
|
+
createTypeQueryNode(exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode;
|
|
3452
|
+
updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode;
|
|
3401
3453
|
createTypeLiteralNode(members: readonly TypeElement[] | undefined): TypeLiteralNode;
|
|
3402
3454
|
updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray<TypeElement>): TypeLiteralNode;
|
|
3403
3455
|
createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
|
|
@@ -3419,7 +3471,9 @@ declare namespace ts {
|
|
|
3419
3471
|
createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode;
|
|
3420
3472
|
updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode;
|
|
3421
3473
|
createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode;
|
|
3474
|
+
createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode;
|
|
3422
3475
|
updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode;
|
|
3476
|
+
updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode;
|
|
3423
3477
|
createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
|
|
3424
3478
|
updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
|
|
3425
3479
|
createThisTypeNode(): ThisTypeNode;
|
|
@@ -3582,6 +3636,8 @@ declare namespace ts {
|
|
|
3582
3636
|
updateAssertClause(node: AssertClause, elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause;
|
|
3583
3637
|
createAssertEntry(name: AssertionKey, value: Expression): AssertEntry;
|
|
3584
3638
|
updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry;
|
|
3639
|
+
createImportTypeAssertionContainer(clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer;
|
|
3640
|
+
updateImportTypeAssertionContainer(node: ImportTypeAssertionContainer, clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer;
|
|
3585
3641
|
createNamespaceImport(name: Identifier): NamespaceImport;
|
|
3586
3642
|
updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
|
|
3587
3643
|
createNamespaceExport(name: Identifier): NamespaceExport;
|
|
@@ -3602,9 +3658,9 @@ declare namespace ts {
|
|
|
3602
3658
|
updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference;
|
|
3603
3659
|
createJSDocAllType(): JSDocAllType;
|
|
3604
3660
|
createJSDocUnknownType(): JSDocUnknownType;
|
|
3605
|
-
createJSDocNonNullableType(type: TypeNode): JSDocNonNullableType;
|
|
3661
|
+
createJSDocNonNullableType(type: TypeNode, postfix?: boolean): JSDocNonNullableType;
|
|
3606
3662
|
updateJSDocNonNullableType(node: JSDocNonNullableType, type: TypeNode): JSDocNonNullableType;
|
|
3607
|
-
createJSDocNullableType(type: TypeNode): JSDocNullableType;
|
|
3663
|
+
createJSDocNullableType(type: TypeNode, postfix?: boolean): JSDocNullableType;
|
|
3608
3664
|
updateJSDocNullableType(node: JSDocNullableType, type: TypeNode): JSDocNullableType;
|
|
3609
3665
|
createJSDocOptionalType(type: TypeNode): JSDocOptionalType;
|
|
3610
3666
|
updateJSDocOptionalType(node: JSDocOptionalType, type: TypeNode): JSDocOptionalType;
|
|
@@ -4048,6 +4104,8 @@ declare namespace ts {
|
|
|
4048
4104
|
readonly includeAutomaticOptionalChainCompletions?: boolean;
|
|
4049
4105
|
readonly includeCompletionsWithInsertText?: boolean;
|
|
4050
4106
|
readonly includeCompletionsWithClassMemberSnippets?: boolean;
|
|
4107
|
+
readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean;
|
|
4108
|
+
readonly useLabelDetailsInCompletionEntries?: boolean;
|
|
4051
4109
|
readonly allowIncompleteCompletions?: boolean;
|
|
4052
4110
|
readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
|
|
4053
4111
|
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
|
|
@@ -4057,6 +4115,13 @@ declare namespace ts {
|
|
|
4057
4115
|
readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
|
|
4058
4116
|
readonly provideRefactorNotApplicableReason?: boolean;
|
|
4059
4117
|
readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none";
|
|
4118
|
+
readonly includeInlayParameterNameHints?: "none" | "literals" | "all";
|
|
4119
|
+
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
|
|
4120
|
+
readonly includeInlayFunctionParameterTypeHints?: boolean;
|
|
4121
|
+
readonly includeInlayVariableTypeHints?: boolean;
|
|
4122
|
+
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
|
4123
|
+
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
|
4124
|
+
readonly includeInlayEnumMemberValueHints?: boolean;
|
|
4060
4125
|
}
|
|
4061
4126
|
/** Represents a bigint literal value without requiring bigint support */
|
|
4062
4127
|
export interface PseudoBigInt {
|
|
@@ -4748,7 +4813,22 @@ declare namespace ts {
|
|
|
4748
4813
|
* that they appear in the source code. The language service depends on this property to locate nodes by position.
|
|
4749
4814
|
*/
|
|
4750
4815
|
export function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
|
|
4751
|
-
export
|
|
4816
|
+
export interface CreateSourceFileOptions {
|
|
4817
|
+
languageVersion: ScriptTarget;
|
|
4818
|
+
/**
|
|
4819
|
+
* Controls the format the file is detected as - this can be derived from only the path
|
|
4820
|
+
* and files on disk, but needs to be done with a module resolution cache in scope to be performant.
|
|
4821
|
+
* This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`.
|
|
4822
|
+
*/
|
|
4823
|
+
impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS;
|
|
4824
|
+
/**
|
|
4825
|
+
* Controls how module-y-ness is set for the given file. Usually the result of calling
|
|
4826
|
+
* `getSetExternalModuleIndicator` on a valid `CompilerOptions` object. If not present, the default
|
|
4827
|
+
* check specified by `isFileProbablyExternalModule` will be used to set the field.
|
|
4828
|
+
*/
|
|
4829
|
+
setExternalModuleIndicator?: (file: SourceFile) => void;
|
|
4830
|
+
}
|
|
4831
|
+
export function createSourceFile(fileName: string, sourceText: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile;
|
|
4752
4832
|
export function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined;
|
|
4753
4833
|
/**
|
|
4754
4834
|
* Parse json text into SyntaxTree and return node and parse errors if any
|
|
@@ -4855,7 +4935,7 @@ declare namespace ts {
|
|
|
4855
4935
|
* This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups
|
|
4856
4936
|
* is assumed to be the same as root directory of the project.
|
|
4857
4937
|
*/
|
|
4858
|
-
export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
|
|
4938
|
+
export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?: SourceFile["impliedNodeFormat"]): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
|
|
4859
4939
|
/**
|
|
4860
4940
|
* Given a set of options, returns the set of type directive names
|
|
4861
4941
|
* that should be included for this program automatically.
|
|
@@ -5276,7 +5356,7 @@ declare namespace ts {
|
|
|
5276
5356
|
/** If provided, used to resolve the module names, otherwise typescript's default module resolution */
|
|
5277
5357
|
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
|
|
5278
5358
|
/** If provided, used to resolve type reference directives, otherwise typescript's default resolution */
|
|
5279
|
-
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
|
|
5359
|
+
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[];
|
|
5280
5360
|
}
|
|
5281
5361
|
interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost {
|
|
5282
5362
|
/** Instead of using output d.ts file from project reference, use its source file */
|
|
@@ -5648,7 +5728,7 @@ declare namespace ts {
|
|
|
5648
5728
|
set(response: CompletionInfo): void;
|
|
5649
5729
|
clear(): void;
|
|
5650
5730
|
}
|
|
5651
|
-
interface LanguageServiceHost extends GetEffectiveTypeRootsHost {
|
|
5731
|
+
interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalResolutionCacheHost {
|
|
5652
5732
|
getCompilationSettings(): CompilerOptions;
|
|
5653
5733
|
getNewLine?(): string;
|
|
5654
5734
|
getProjectVersion?(): string;
|
|
@@ -5666,13 +5746,13 @@ declare namespace ts {
|
|
|
5666
5746
|
error?(s: string): void;
|
|
5667
5747
|
useCaseSensitiveFileNames?(): boolean;
|
|
5668
5748
|
readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
|
|
5669
|
-
readFile?(path: string, encoding?: string): string | undefined;
|
|
5670
5749
|
realpath?(path: string): string;
|
|
5671
|
-
|
|
5750
|
+
readFile(path: string, encoding?: string): string | undefined;
|
|
5751
|
+
fileExists(path: string): boolean;
|
|
5672
5752
|
getTypeRootsVersion?(): number;
|
|
5673
5753
|
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
|
|
5674
5754
|
getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined;
|
|
5675
|
-
resolveTypeReferenceDirectives?(typeDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
|
|
5755
|
+
resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[];
|
|
5676
5756
|
getDirectories?(directoryName: string): string[];
|
|
5677
5757
|
/**
|
|
5678
5758
|
* Gets a set of custom transformers to use during emit.
|
|
@@ -5881,15 +5961,6 @@ declare namespace ts {
|
|
|
5881
5961
|
/** @deprecated Use includeCompletionsWithInsertText */
|
|
5882
5962
|
includeInsertTextCompletions?: boolean;
|
|
5883
5963
|
}
|
|
5884
|
-
interface InlayHintsOptions extends UserPreferences {
|
|
5885
|
-
readonly includeInlayParameterNameHints?: "none" | "literals" | "all";
|
|
5886
|
-
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
|
|
5887
|
-
readonly includeInlayFunctionParameterTypeHints?: boolean;
|
|
5888
|
-
readonly includeInlayVariableTypeHints?: boolean;
|
|
5889
|
-
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
|
5890
|
-
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
|
5891
|
-
readonly includeInlayEnumMemberValueHints?: boolean;
|
|
5892
|
-
}
|
|
5893
5964
|
type SignatureHelpTriggerCharacter = "," | "(" | "<";
|
|
5894
5965
|
type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
|
|
5895
5966
|
interface SignatureHelpItemsOptions {
|
|
@@ -6139,7 +6210,6 @@ declare namespace ts {
|
|
|
6139
6210
|
}
|
|
6140
6211
|
interface ReferenceEntry extends DocumentSpan {
|
|
6141
6212
|
isWriteAccess: boolean;
|
|
6142
|
-
isDefinition: boolean;
|
|
6143
6213
|
isInString?: true;
|
|
6144
6214
|
}
|
|
6145
6215
|
interface ImplementationLocation extends DocumentSpan {
|
|
@@ -6253,7 +6323,10 @@ declare namespace ts {
|
|
|
6253
6323
|
}
|
|
6254
6324
|
interface ReferencedSymbol {
|
|
6255
6325
|
definition: ReferencedSymbolDefinitionInfo;
|
|
6256
|
-
references:
|
|
6326
|
+
references: ReferencedSymbolEntry[];
|
|
6327
|
+
}
|
|
6328
|
+
interface ReferencedSymbolEntry extends ReferenceEntry {
|
|
6329
|
+
isDefinition?: boolean;
|
|
6257
6330
|
}
|
|
6258
6331
|
enum SymbolDisplayPartKind {
|
|
6259
6332
|
aliasName = 0,
|
|
@@ -6362,7 +6435,18 @@ declare namespace ts {
|
|
|
6362
6435
|
argumentIndex: number;
|
|
6363
6436
|
argumentCount: number;
|
|
6364
6437
|
}
|
|
6438
|
+
enum CompletionInfoFlags {
|
|
6439
|
+
None = 0,
|
|
6440
|
+
MayIncludeAutoImports = 1,
|
|
6441
|
+
IsImportStatementCompletion = 2,
|
|
6442
|
+
IsContinuation = 4,
|
|
6443
|
+
ResolvedModuleSpecifiers = 8,
|
|
6444
|
+
ResolvedModuleSpecifiersBeyondLimit = 16,
|
|
6445
|
+
MayIncludeMethodSnippets = 32
|
|
6446
|
+
}
|
|
6365
6447
|
interface CompletionInfo {
|
|
6448
|
+
/** For performance telemetry. */
|
|
6449
|
+
flags?: CompletionInfoFlags;
|
|
6366
6450
|
/** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */
|
|
6367
6451
|
isGlobalCompletion: boolean;
|
|
6368
6452
|
isMemberCompletion: boolean;
|
|
@@ -6420,6 +6504,7 @@ declare namespace ts {
|
|
|
6420
6504
|
hasAction?: true;
|
|
6421
6505
|
source?: string;
|
|
6422
6506
|
sourceDisplay?: SymbolDisplayPart[];
|
|
6507
|
+
labelDetails?: CompletionEntryLabelDetails;
|
|
6423
6508
|
isRecommended?: true;
|
|
6424
6509
|
isFromUncheckedFile?: true;
|
|
6425
6510
|
isPackageJsonImport?: true;
|
|
@@ -6434,6 +6519,10 @@ declare namespace ts {
|
|
|
6434
6519
|
*/
|
|
6435
6520
|
data?: CompletionEntryData;
|
|
6436
6521
|
}
|
|
6522
|
+
interface CompletionEntryLabelDetails {
|
|
6523
|
+
detail?: string;
|
|
6524
|
+
description?: string;
|
|
6525
|
+
}
|
|
6437
6526
|
interface CompletionEntryDetails {
|
|
6438
6527
|
name: string;
|
|
6439
6528
|
kind: ScriptElementKind;
|
|
@@ -6693,7 +6782,7 @@ declare namespace ts {
|
|
|
6693
6782
|
cancellationToken: CancellationToken;
|
|
6694
6783
|
host: LanguageServiceHost;
|
|
6695
6784
|
span: TextSpan;
|
|
6696
|
-
preferences:
|
|
6785
|
+
preferences: UserPreferences;
|
|
6697
6786
|
}
|
|
6698
6787
|
}
|
|
6699
6788
|
declare namespace ts {
|
|
@@ -6729,30 +6818,36 @@ declare namespace ts {
|
|
|
6729
6818
|
* the SourceFile if was not found in the registry.
|
|
6730
6819
|
*
|
|
6731
6820
|
* @param fileName The name of the file requested
|
|
6732
|
-
* @param
|
|
6821
|
+
* @param compilationSettingsOrHost Some compilation settings like target affects the
|
|
6733
6822
|
* shape of a the resulting SourceFile. This allows the DocumentRegistry to store
|
|
6734
|
-
* multiple copies of the same file for different compilation settings.
|
|
6823
|
+
* multiple copies of the same file for different compilation settings. A minimal
|
|
6824
|
+
* resolution cache is needed to fully define a source file's shape when
|
|
6825
|
+
* the compilation settings include `module: node16`+, so providing a cache host
|
|
6826
|
+
* object should be preferred. A common host is a language service `ConfiguredProject`.
|
|
6735
6827
|
* @param scriptSnapshot Text of the file. Only used if the file was not found
|
|
6736
6828
|
* in the registry and a new one was created.
|
|
6737
6829
|
* @param version Current version of the file. Only used if the file was not found
|
|
6738
6830
|
* in the registry and a new one was created.
|
|
6739
6831
|
*/
|
|
6740
|
-
acquireDocument(fileName: string,
|
|
6741
|
-
acquireDocumentWithKey(fileName: string, path: Path,
|
|
6832
|
+
acquireDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
|
|
6833
|
+
acquireDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
|
|
6742
6834
|
/**
|
|
6743
6835
|
* Request an updated version of an already existing SourceFile with a given fileName
|
|
6744
6836
|
* and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile
|
|
6745
6837
|
* to get an updated SourceFile.
|
|
6746
6838
|
*
|
|
6747
6839
|
* @param fileName The name of the file requested
|
|
6748
|
-
* @param
|
|
6840
|
+
* @param compilationSettingsOrHost Some compilation settings like target affects the
|
|
6749
6841
|
* shape of a the resulting SourceFile. This allows the DocumentRegistry to store
|
|
6750
|
-
* multiple copies of the same file for different compilation settings.
|
|
6842
|
+
* multiple copies of the same file for different compilation settings. A minimal
|
|
6843
|
+
* resolution cache is needed to fully define a source file's shape when
|
|
6844
|
+
* the compilation settings include `module: node16`+, so providing a cache host
|
|
6845
|
+
* object should be preferred. A common host is a language service `ConfiguredProject`.
|
|
6751
6846
|
* @param scriptSnapshot Text of the file.
|
|
6752
6847
|
* @param version Current version of the file.
|
|
6753
6848
|
*/
|
|
6754
|
-
updateDocument(fileName: string,
|
|
6755
|
-
updateDocumentWithKey(fileName: string, path: Path,
|
|
6849
|
+
updateDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
|
|
6850
|
+
updateDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
|
|
6756
6851
|
getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey;
|
|
6757
6852
|
/**
|
|
6758
6853
|
* Informs the DocumentRegistry that a file is not needed any longer.
|
|
@@ -6814,7 +6909,7 @@ declare namespace ts {
|
|
|
6814
6909
|
function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string;
|
|
6815
6910
|
function getDefaultCompilerOptions(): CompilerOptions;
|
|
6816
6911
|
function getSupportedCodeFixes(): string[];
|
|
6817
|
-
function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot,
|
|
6912
|
+
function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: ScriptTarget | CreateSourceFileOptions, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile;
|
|
6818
6913
|
function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean): SourceFile;
|
|
6819
6914
|
function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService;
|
|
6820
6915
|
/**
|
|
@@ -6878,9 +6973,15 @@ declare namespace ts {
|
|
|
6878
6973
|
/** @deprecated Use `factory.updateComputedPropertyName` or the factory supplied by your transformation context instead. */
|
|
6879
6974
|
const updateComputedPropertyName: (node: ComputedPropertyName, expression: Expression) => ComputedPropertyName;
|
|
6880
6975
|
/** @deprecated Use `factory.createTypeParameterDeclaration` or the factory supplied by your transformation context instead. */
|
|
6881
|
-
const createTypeParameterDeclaration:
|
|
6976
|
+
const createTypeParameterDeclaration: {
|
|
6977
|
+
(modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined): TypeParameterDeclaration;
|
|
6978
|
+
(name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined): TypeParameterDeclaration;
|
|
6979
|
+
};
|
|
6882
6980
|
/** @deprecated Use `factory.updateTypeParameterDeclaration` or the factory supplied by your transformation context instead. */
|
|
6883
|
-
const updateTypeParameterDeclaration:
|
|
6981
|
+
const updateTypeParameterDeclaration: {
|
|
6982
|
+
(node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
|
|
6983
|
+
(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
|
|
6984
|
+
};
|
|
6884
6985
|
/** @deprecated Use `factory.createParameterDeclaration` or the factory supplied by your transformation context instead. */
|
|
6885
6986
|
const createParameter: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken | undefined, type?: TypeNode | undefined, initializer?: Expression | undefined) => ParameterDeclaration;
|
|
6886
6987
|
/** @deprecated Use `factory.updateParameterDeclaration` or the factory supplied by your transformation context instead. */
|
|
@@ -6938,9 +7039,9 @@ declare namespace ts {
|
|
|
6938
7039
|
/** @deprecated Use `factory.updateConstructorTypeNode` or the factory supplied by your transformation context instead. */
|
|
6939
7040
|
const updateConstructorTypeNode: (node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => ConstructorTypeNode;
|
|
6940
7041
|
/** @deprecated Use `factory.createTypeQueryNode` or the factory supplied by your transformation context instead. */
|
|
6941
|
-
const createTypeQueryNode: (exprName: EntityName) => TypeQueryNode;
|
|
7042
|
+
const createTypeQueryNode: (exprName: EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeQueryNode;
|
|
6942
7043
|
/** @deprecated Use `factory.updateTypeQueryNode` or the factory supplied by your transformation context instead. */
|
|
6943
|
-
const updateTypeQueryNode: (node: TypeQueryNode, exprName: EntityName) => TypeQueryNode;
|
|
7044
|
+
const updateTypeQueryNode: (node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeQueryNode;
|
|
6944
7045
|
/** @deprecated Use `factory.createTypeLiteralNode` or the factory supplied by your transformation context instead. */
|
|
6945
7046
|
const createTypeLiteralNode: (members: readonly TypeElement[] | undefined) => TypeLiteralNode;
|
|
6946
7047
|
/** @deprecated Use `factory.updateTypeLiteralNode` or the factory supplied by your transformation context instead. */
|
|
@@ -6978,9 +7079,15 @@ declare namespace ts {
|
|
|
6978
7079
|
/** @deprecated Use `factory.updateInferTypeNode` or the factory supplied by your transformation context instead. */
|
|
6979
7080
|
const updateInferTypeNode: (node: InferTypeNode, typeParameter: TypeParameterDeclaration) => InferTypeNode;
|
|
6980
7081
|
/** @deprecated Use `factory.createImportTypeNode` or the factory supplied by your transformation context instead. */
|
|
6981
|
-
const createImportTypeNode:
|
|
7082
|
+
const createImportTypeNode: {
|
|
7083
|
+
(argument: TypeNode, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode;
|
|
7084
|
+
(argument: TypeNode, assertions?: ImportTypeAssertionContainer | undefined, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode;
|
|
7085
|
+
};
|
|
6982
7086
|
/** @deprecated Use `factory.updateImportTypeNode` or the factory supplied by your transformation context instead. */
|
|
6983
|
-
const updateImportTypeNode:
|
|
7087
|
+
const updateImportTypeNode: {
|
|
7088
|
+
(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode;
|
|
7089
|
+
(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode;
|
|
7090
|
+
};
|
|
6984
7091
|
/** @deprecated Use `factory.createParenthesizedType` or the factory supplied by your transformation context instead. */
|
|
6985
7092
|
const createParenthesizedType: (type: TypeNode) => ParenthesizedTypeNode;
|
|
6986
7093
|
/** @deprecated Use `factory.updateParenthesizedType` or the factory supplied by your transformation context instead. */
|