@schematics/angular 14.0.0-next.7 → 14.0.0-rc.0

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.
Files changed (49) hide show
  1. package/app-shell/index.js +4 -8
  2. package/application/files/src/test.ts.template +1 -1
  3. package/application/index.js +3 -3
  4. package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template +1 -1
  5. package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template +5 -2
  6. package/component/index.js +9 -14
  7. package/component/schema.d.ts +4 -0
  8. package/component/schema.json +6 -0
  9. package/directive/files/__name@dasherize@if-flat__/__name@dasherize__.directive.ts.template +2 -1
  10. package/directive/index.js +9 -18
  11. package/directive/schema.d.ts +4 -0
  12. package/directive/schema.json +6 -0
  13. package/e2e/index.js +5 -5
  14. package/library/files/src/test.ts.template +1 -1
  15. package/library/index.js +3 -4
  16. package/migrations/migration-collection.json +5 -0
  17. package/migrations/update-14/update-libraries-secondary-entrypoints.d.ts +10 -0
  18. package/migrations/update-14/update-libraries-secondary-entrypoints.js +51 -0
  19. package/module/index.js +8 -16
  20. package/package.json +10 -3
  21. package/pipe/files/__name@dasherize@if-flat__/__name@dasherize__.pipe.ts.template +2 -1
  22. package/pipe/index.js +8 -17
  23. package/pipe/schema.d.ts +4 -0
  24. package/pipe/schema.json +6 -0
  25. package/service-worker/index.js +4 -8
  26. package/third_party/github.com/Microsoft/TypeScript/BUILD.bazel +4 -4
  27. package/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts +385 -290
  28. package/third_party/github.com/Microsoft/TypeScript/lib/typescript.js +11509 -9414
  29. package/universal/index.js +3 -7
  30. package/utility/ast-utils.js +26 -26
  31. package/utility/dependency.d.ts +45 -0
  32. package/utility/dependency.js +97 -0
  33. package/utility/find-module.d.ts +1 -0
  34. package/utility/find-module.js +5 -10
  35. package/utility/generate-from-files.js +2 -3
  36. package/utility/index.d.ts +10 -0
  37. package/utility/index.js +21 -0
  38. package/utility/json-file.js +1 -7
  39. package/utility/latest-versions/package.json +4 -3
  40. package/utility/latest-versions.js +1 -1
  41. package/utility/ng-ast-utils.js +2 -10
  42. package/utility/parse-name.js +0 -1
  43. package/utility/validation.js +1 -3
  44. package/utility/workspace-models.d.ts +6 -0
  45. package/utility/workspace-models.js +6 -0
  46. package/utility/workspace.d.ts +36 -3
  47. package/utility/workspace.js +70 -34
  48. package/web-worker/index.js +2 -2
  49. 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.6";
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
- ReadonlyKeyword = 144,
253
- RequireKeyword = 145,
254
- NumberKeyword = 146,
255
- ObjectKeyword = 147,
256
- SetKeyword = 148,
257
- StringKeyword = 149,
258
- SymbolKeyword = 150,
259
- TypeKeyword = 151,
260
- UndefinedKeyword = 152,
261
- UniqueKeyword = 153,
262
- UnknownKeyword = 154,
263
- FromKeyword = 155,
264
- GlobalKeyword = 156,
265
- BigIntKeyword = 157,
266
- OverrideKeyword = 158,
267
- OfKeyword = 159,
268
- QualifiedName = 160,
269
- ComputedPropertyName = 161,
270
- TypeParameter = 162,
271
- Parameter = 163,
272
- Decorator = 164,
273
- PropertySignature = 165,
274
- PropertyDeclaration = 166,
275
- MethodSignature = 167,
276
- MethodDeclaration = 168,
277
- ClassStaticBlockDeclaration = 169,
278
- Constructor = 170,
279
- GetAccessor = 171,
280
- SetAccessor = 172,
281
- CallSignature = 173,
282
- ConstructSignature = 174,
283
- IndexSignature = 175,
284
- TypePredicate = 176,
285
- TypeReference = 177,
286
- FunctionType = 178,
287
- ConstructorType = 179,
288
- TypeQuery = 180,
289
- TypeLiteral = 181,
290
- ArrayType = 182,
291
- TupleType = 183,
292
- OptionalType = 184,
293
- RestType = 185,
294
- UnionType = 186,
295
- IntersectionType = 187,
296
- ConditionalType = 188,
297
- InferType = 189,
298
- ParenthesizedType = 190,
299
- ThisType = 191,
300
- TypeOperator = 192,
301
- IndexedAccessType = 193,
302
- MappedType = 194,
303
- LiteralType = 195,
304
- NamedTupleMember = 196,
305
- TemplateLiteralType = 197,
306
- TemplateLiteralTypeSpan = 198,
307
- ImportType = 199,
308
- ObjectBindingPattern = 200,
309
- ArrayBindingPattern = 201,
310
- BindingElement = 202,
311
- ArrayLiteralExpression = 203,
312
- ObjectLiteralExpression = 204,
313
- PropertyAccessExpression = 205,
314
- ElementAccessExpression = 206,
315
- CallExpression = 207,
316
- NewExpression = 208,
317
- TaggedTemplateExpression = 209,
318
- TypeAssertionExpression = 210,
319
- ParenthesizedExpression = 211,
320
- FunctionExpression = 212,
321
- ArrowFunction = 213,
322
- DeleteExpression = 214,
323
- TypeOfExpression = 215,
324
- VoidExpression = 216,
325
- AwaitExpression = 217,
326
- PrefixUnaryExpression = 218,
327
- PostfixUnaryExpression = 219,
328
- BinaryExpression = 220,
329
- ConditionalExpression = 221,
330
- TemplateExpression = 222,
331
- YieldExpression = 223,
332
- SpreadElement = 224,
333
- ClassExpression = 225,
334
- OmittedExpression = 226,
335
- ExpressionWithTypeArguments = 227,
336
- AsExpression = 228,
337
- NonNullExpression = 229,
338
- MetaProperty = 230,
339
- SyntheticExpression = 231,
340
- TemplateSpan = 232,
341
- SemicolonClassElement = 233,
342
- Block = 234,
343
- EmptyStatement = 235,
344
- VariableStatement = 236,
345
- ExpressionStatement = 237,
346
- IfStatement = 238,
347
- DoStatement = 239,
348
- WhileStatement = 240,
349
- ForStatement = 241,
350
- ForInStatement = 242,
351
- ForOfStatement = 243,
352
- ContinueStatement = 244,
353
- BreakStatement = 245,
354
- ReturnStatement = 246,
355
- WithStatement = 247,
356
- SwitchStatement = 248,
357
- LabeledStatement = 249,
358
- ThrowStatement = 250,
359
- TryStatement = 251,
360
- DebuggerStatement = 252,
361
- VariableDeclaration = 253,
362
- VariableDeclarationList = 254,
363
- FunctionDeclaration = 255,
364
- ClassDeclaration = 256,
365
- InterfaceDeclaration = 257,
366
- TypeAliasDeclaration = 258,
367
- EnumDeclaration = 259,
368
- ModuleDeclaration = 260,
369
- ModuleBlock = 261,
370
- CaseBlock = 262,
371
- NamespaceExportDeclaration = 263,
372
- ImportEqualsDeclaration = 264,
373
- ImportDeclaration = 265,
374
- ImportClause = 266,
375
- NamespaceImport = 267,
376
- NamedImports = 268,
377
- ImportSpecifier = 269,
378
- ExportAssignment = 270,
379
- ExportDeclaration = 271,
380
- NamedExports = 272,
381
- NamespaceExport = 273,
382
- ExportSpecifier = 274,
383
- MissingDeclaration = 275,
384
- ExternalModuleReference = 276,
385
- JsxElement = 277,
386
- JsxSelfClosingElement = 278,
387
- JsxOpeningElement = 279,
388
- JsxClosingElement = 280,
389
- JsxFragment = 281,
390
- JsxOpeningFragment = 282,
391
- JsxClosingFragment = 283,
392
- JsxAttribute = 284,
393
- JsxAttributes = 285,
394
- JsxSpreadAttribute = 286,
395
- JsxExpression = 287,
396
- CaseClause = 288,
397
- DefaultClause = 289,
398
- HeritageClause = 290,
399
- CatchClause = 291,
400
- AssertClause = 292,
401
- AssertEntry = 293,
402
- PropertyAssignment = 294,
403
- ShorthandPropertyAssignment = 295,
404
- SpreadAssignment = 296,
405
- EnumMember = 297,
406
- UnparsedPrologue = 298,
407
- UnparsedPrepend = 299,
408
- UnparsedText = 300,
409
- UnparsedInternalText = 301,
410
- UnparsedSyntheticReference = 302,
411
- SourceFile = 303,
412
- Bundle = 304,
413
- UnparsedSource = 305,
414
- InputFiles = 306,
415
- JSDocTypeExpression = 307,
416
- JSDocNameReference = 308,
417
- JSDocMemberName = 309,
418
- JSDocAllType = 310,
419
- JSDocUnknownType = 311,
420
- JSDocNullableType = 312,
421
- JSDocNonNullableType = 313,
422
- JSDocOptionalType = 314,
423
- JSDocFunctionType = 315,
424
- JSDocVariadicType = 316,
425
- JSDocNamepathType = 317,
426
- JSDocComment = 318,
427
- JSDocText = 319,
428
- JSDocTypeLiteral = 320,
429
- JSDocSignature = 321,
430
- JSDocLink = 322,
431
- JSDocLinkCode = 323,
432
- JSDocLinkPlain = 324,
433
- JSDocTag = 325,
434
- JSDocAugmentsTag = 326,
435
- JSDocImplementsTag = 327,
436
- JSDocAuthorTag = 328,
437
- JSDocDeprecatedTag = 329,
438
- JSDocClassTag = 330,
439
- JSDocPublicTag = 331,
440
- JSDocPrivateTag = 332,
441
- JSDocProtectedTag = 333,
442
- JSDocReadonlyTag = 334,
443
- JSDocOverrideTag = 335,
444
- JSDocCallbackTag = 336,
445
- JSDocEnumTag = 337,
446
- JSDocParameterTag = 338,
447
- JSDocReturnTag = 339,
448
- JSDocThisTag = 340,
449
- JSDocTypeTag = 341,
450
- JSDocTemplateTag = 342,
451
- JSDocTypedefTag = 343,
452
- JSDocSeeTag = 344,
453
- JSDocPropertyTag = 345,
454
- SyntaxList = 346,
455
- NotEmittedStatement = 347,
456
- PartiallyEmittedExpression = 348,
457
- CommaListExpression = 349,
458
- MergeDeclarationMarker = 350,
459
- EndOfDeclarationMarker = 351,
460
- SyntheticReferenceExpression = 352,
461
- Count = 353,
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 = 159,
472
+ LastKeyword = 160,
470
473
  FirstFutureReservedWord = 117,
471
474
  LastFutureReservedWord = 125,
472
- FirstTypeNode = 176,
473
- LastTypeNode = 199,
475
+ FirstTypeNode = 177,
476
+ LastTypeNode = 200,
474
477
  FirstPunctuation = 18,
475
478
  LastPunctuation = 78,
476
479
  FirstToken = 0,
477
- LastToken = 159,
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 = 236,
487
- LastStatement = 252,
488
- FirstNode = 160,
489
- FirstJSDocNode = 307,
490
- LastJSDocNode = 345,
491
- FirstJSDocTagNode = 325,
492
- LastJSDocTagNode = 345,
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
- ThisNodeHasError = 65536,
523
- JavaScriptFile = 131072,
524
- ThisNodeOrAnySubNodesHasError = 262144,
525
- HasAggregatedChildData = 524288,
526
- JSDoc = 4194304,
527
- JsonFile = 33554432,
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 = 25358336,
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 = 18654,
561
+ TypeScriptModifier = 116958,
555
562
  ExportDefault = 513,
556
- All = 27647
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 TypeNode {
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.JSDocComment;
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 | FlowCall | FlowCondition | FlowSwitchClause | FlowArrayMutation | FlowCall | FlowReduceLabel;
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>;
@@ -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 string[] | undefined;
2101
+ typeReferenceDirectives: readonly FileReference[] | undefined;
2078
2102
  libReferenceDirectives: readonly FileReference[];
2079
2103
  hasNoDefaultLib?: boolean;
2080
2104
  sourceMapPath?: string;
@@ -2654,13 +2678,13 @@ declare namespace ts {
2654
2678
  ObjectLiteralPatternWithComputedProperties = 512,
2655
2679
  ReverseMapped = 1024,
2656
2680
  JsxAttributes = 2048,
2657
- MarkerType = 4096,
2658
- JSLiteral = 8192,
2659
- FreshLiteral = 16384,
2660
- ArrayLiteral = 32768,
2681
+ JSLiteral = 4096,
2682
+ FreshLiteral = 8192,
2683
+ ArrayLiteral = 16384,
2661
2684
  ClassOrInterface = 3,
2662
- ContainsSpread = 4194304,
2663
- ObjectRestType = 8388608,
2685
+ ContainsSpread = 2097152,
2686
+ ObjectRestType = 4194304,
2687
+ InstantiationExpressionType = 8388608,
2664
2688
  }
2665
2689
  export interface ObjectType extends Type {
2666
2690
  objectFlags: ObjectFlags;
@@ -2871,6 +2895,20 @@ declare namespace ts {
2871
2895
  Node12 = 3,
2872
2896
  NodeNext = 99
2873
2897
  }
2898
+ export enum ModuleDetectionKind {
2899
+ /**
2900
+ * Files with imports, exports and/or import.meta are considered modules
2901
+ */
2902
+ Legacy = 1,
2903
+ /**
2904
+ * Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node12+
2905
+ */
2906
+ Auto = 2,
2907
+ /**
2908
+ * Consider all non-declaration files modules, regardless of present syntax
2909
+ */
2910
+ Force = 3
2911
+ }
2874
2912
  export interface PluginImport {
2875
2913
  name: string;
2876
2914
  }
@@ -2942,6 +2980,8 @@ declare namespace ts {
2942
2980
  maxNodeModuleJsDepth?: number;
2943
2981
  module?: ModuleKind;
2944
2982
  moduleResolution?: ModuleResolutionKind;
2983
+ moduleSuffixes?: string[];
2984
+ moduleDetection?: ModuleDetectionKind;
2945
2985
  newLine?: NewLineKind;
2946
2986
  noEmit?: boolean;
2947
2987
  noEmitHelpers?: boolean;
@@ -3127,7 +3167,14 @@ declare namespace ts {
3127
3167
  realpath?(path: string): string;
3128
3168
  getCurrentDirectory?(): string;
3129
3169
  getDirectories?(path: string): string[];
3130
- useCaseSensitiveFileNames?: boolean | (() => boolean);
3170
+ useCaseSensitiveFileNames?: boolean | (() => boolean) | undefined;
3171
+ }
3172
+ /**
3173
+ * Used by services to specify the minimum host area required to set up source files under any compilation settings
3174
+ */
3175
+ export interface MinimalResolutionCacheHost extends ModuleResolutionHost {
3176
+ getCompilationSettings(): CompilerOptions;
3177
+ getCompilerHost?(): CompilerHost | undefined;
3131
3178
  }
3132
3179
  /**
3133
3180
  * Represents the result of module resolution.
@@ -3204,8 +3251,8 @@ declare namespace ts {
3204
3251
  readonly failedLookupLocations: string[];
3205
3252
  }
3206
3253
  export interface CompilerHost extends ModuleResolutionHost {
3207
- getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
3208
- getSourceFileByPath?(fileName: string, path: Path, languageVersion: ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
3254
+ getSourceFile(fileName: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
3255
+ getSourceFileByPath?(fileName: string, path: Path, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
3209
3256
  getCancellationToken?(): CancellationToken;
3210
3257
  getDefaultLibFileName(options: CompilerOptions): string;
3211
3258
  getDefaultLibLocation?(): string;
@@ -3223,7 +3270,7 @@ declare namespace ts {
3223
3270
  /**
3224
3271
  * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
3225
3272
  */
3226
- resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
3273
+ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[];
3227
3274
  getEnvironmentVariable?(name: string): string | undefined;
3228
3275
  createHash?(data: string): string;
3229
3276
  getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
@@ -3353,7 +3400,11 @@ declare namespace ts {
3353
3400
  updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName;
3354
3401
  createComputedPropertyName(expression: Expression): ComputedPropertyName;
3355
3402
  updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName;
3403
+ createTypeParameterDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration;
3404
+ /** @deprecated */
3356
3405
  createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration;
3406
+ updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
3407
+ /** @deprecated */
3357
3408
  updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
3358
3409
  createParameterDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration;
3359
3410
  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 +3447,8 @@ declare namespace ts {
3396
3447
  updateConstructorTypeNode(node: ConstructorTypeNode, modifiers: readonly Modifier[] | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode;
3397
3448
  /** @deprecated */
3398
3449
  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;
3450
+ createTypeQueryNode(exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode;
3451
+ updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode;
3401
3452
  createTypeLiteralNode(members: readonly TypeElement[] | undefined): TypeLiteralNode;
3402
3453
  updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray<TypeElement>): TypeLiteralNode;
3403
3454
  createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
@@ -3419,7 +3470,9 @@ declare namespace ts {
3419
3470
  createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode;
3420
3471
  updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode;
3421
3472
  createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode;
3473
+ createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode;
3422
3474
  updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode;
3475
+ updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode;
3423
3476
  createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
3424
3477
  updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
3425
3478
  createThisTypeNode(): ThisTypeNode;
@@ -3582,6 +3635,8 @@ declare namespace ts {
3582
3635
  updateAssertClause(node: AssertClause, elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause;
3583
3636
  createAssertEntry(name: AssertionKey, value: Expression): AssertEntry;
3584
3637
  updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry;
3638
+ createImportTypeAssertionContainer(clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer;
3639
+ updateImportTypeAssertionContainer(node: ImportTypeAssertionContainer, clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer;
3585
3640
  createNamespaceImport(name: Identifier): NamespaceImport;
3586
3641
  updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
3587
3642
  createNamespaceExport(name: Identifier): NamespaceExport;
@@ -3602,9 +3657,9 @@ declare namespace ts {
3602
3657
  updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference;
3603
3658
  createJSDocAllType(): JSDocAllType;
3604
3659
  createJSDocUnknownType(): JSDocUnknownType;
3605
- createJSDocNonNullableType(type: TypeNode): JSDocNonNullableType;
3660
+ createJSDocNonNullableType(type: TypeNode, postfix?: boolean): JSDocNonNullableType;
3606
3661
  updateJSDocNonNullableType(node: JSDocNonNullableType, type: TypeNode): JSDocNonNullableType;
3607
- createJSDocNullableType(type: TypeNode): JSDocNullableType;
3662
+ createJSDocNullableType(type: TypeNode, postfix?: boolean): JSDocNullableType;
3608
3663
  updateJSDocNullableType(node: JSDocNullableType, type: TypeNode): JSDocNullableType;
3609
3664
  createJSDocOptionalType(type: TypeNode): JSDocOptionalType;
3610
3665
  updateJSDocOptionalType(node: JSDocOptionalType, type: TypeNode): JSDocOptionalType;
@@ -4048,6 +4103,8 @@ declare namespace ts {
4048
4103
  readonly includeAutomaticOptionalChainCompletions?: boolean;
4049
4104
  readonly includeCompletionsWithInsertText?: boolean;
4050
4105
  readonly includeCompletionsWithClassMemberSnippets?: boolean;
4106
+ readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean;
4107
+ readonly useLabelDetailsInCompletionEntries?: boolean;
4051
4108
  readonly allowIncompleteCompletions?: boolean;
4052
4109
  readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
4053
4110
  /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
@@ -4057,6 +4114,13 @@ declare namespace ts {
4057
4114
  readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
4058
4115
  readonly provideRefactorNotApplicableReason?: boolean;
4059
4116
  readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none";
4117
+ readonly includeInlayParameterNameHints?: "none" | "literals" | "all";
4118
+ readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
4119
+ readonly includeInlayFunctionParameterTypeHints?: boolean;
4120
+ readonly includeInlayVariableTypeHints?: boolean;
4121
+ readonly includeInlayPropertyDeclarationTypeHints?: boolean;
4122
+ readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
4123
+ readonly includeInlayEnumMemberValueHints?: boolean;
4060
4124
  }
4061
4125
  /** Represents a bigint literal value without requiring bigint support */
4062
4126
  export interface PseudoBigInt {
@@ -4748,7 +4812,22 @@ declare namespace ts {
4748
4812
  * that they appear in the source code. The language service depends on this property to locate nodes by position.
4749
4813
  */
4750
4814
  export function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
4751
- export function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile;
4815
+ export interface CreateSourceFileOptions {
4816
+ languageVersion: ScriptTarget;
4817
+ /**
4818
+ * Controls the format the file is detected as - this can be derived from only the path
4819
+ * and files on disk, but needs to be done with a module resolution cache in scope to be performant.
4820
+ * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node12` or `nodenext`.
4821
+ */
4822
+ impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS;
4823
+ /**
4824
+ * Controls how module-y-ness is set for the given file. Usually the result of calling
4825
+ * `getSetExternalModuleIndicator` on a valid `CompilerOptions` object. If not present, the default
4826
+ * check specified by `isFileProbablyExternalModule` will be used to set the field.
4827
+ */
4828
+ setExternalModuleIndicator?: (file: SourceFile) => void;
4829
+ }
4830
+ export function createSourceFile(fileName: string, sourceText: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile;
4752
4831
  export function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined;
4753
4832
  /**
4754
4833
  * Parse json text into SyntaxTree and return node and parse errors if any
@@ -4855,7 +4934,7 @@ declare namespace ts {
4855
4934
  * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups
4856
4935
  * is assumed to be the same as root directory of the project.
4857
4936
  */
4858
- export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
4937
+ export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?: SourceFile["impliedNodeFormat"]): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
4859
4938
  /**
4860
4939
  * Given a set of options, returns the set of type directive names
4861
4940
  * that should be included for this program automatically.
@@ -5276,7 +5355,7 @@ declare namespace ts {
5276
5355
  /** If provided, used to resolve the module names, otherwise typescript's default module resolution */
5277
5356
  resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
5278
5357
  /** 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)[];
5358
+ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[];
5280
5359
  }
5281
5360
  interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost {
5282
5361
  /** Instead of using output d.ts file from project reference, use its source file */
@@ -5648,7 +5727,7 @@ declare namespace ts {
5648
5727
  set(response: CompletionInfo): void;
5649
5728
  clear(): void;
5650
5729
  }
5651
- interface LanguageServiceHost extends GetEffectiveTypeRootsHost {
5730
+ interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalResolutionCacheHost {
5652
5731
  getCompilationSettings(): CompilerOptions;
5653
5732
  getNewLine?(): string;
5654
5733
  getProjectVersion?(): string;
@@ -5666,13 +5745,13 @@ declare namespace ts {
5666
5745
  error?(s: string): void;
5667
5746
  useCaseSensitiveFileNames?(): boolean;
5668
5747
  readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
5669
- readFile?(path: string, encoding?: string): string | undefined;
5670
5748
  realpath?(path: string): string;
5671
- fileExists?(path: string): boolean;
5749
+ readFile(path: string, encoding?: string): string | undefined;
5750
+ fileExists(path: string): boolean;
5672
5751
  getTypeRootsVersion?(): number;
5673
5752
  resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
5674
5753
  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)[];
5754
+ resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[];
5676
5755
  getDirectories?(directoryName: string): string[];
5677
5756
  /**
5678
5757
  * Gets a set of custom transformers to use during emit.
@@ -5881,15 +5960,6 @@ declare namespace ts {
5881
5960
  /** @deprecated Use includeCompletionsWithInsertText */
5882
5961
  includeInsertTextCompletions?: boolean;
5883
5962
  }
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
5963
  type SignatureHelpTriggerCharacter = "," | "(" | "<";
5894
5964
  type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
5895
5965
  interface SignatureHelpItemsOptions {
@@ -6139,7 +6209,6 @@ declare namespace ts {
6139
6209
  }
6140
6210
  interface ReferenceEntry extends DocumentSpan {
6141
6211
  isWriteAccess: boolean;
6142
- isDefinition: boolean;
6143
6212
  isInString?: true;
6144
6213
  }
6145
6214
  interface ImplementationLocation extends DocumentSpan {
@@ -6253,7 +6322,10 @@ declare namespace ts {
6253
6322
  }
6254
6323
  interface ReferencedSymbol {
6255
6324
  definition: ReferencedSymbolDefinitionInfo;
6256
- references: ReferenceEntry[];
6325
+ references: ReferencedSymbolEntry[];
6326
+ }
6327
+ interface ReferencedSymbolEntry extends ReferenceEntry {
6328
+ isDefinition?: boolean;
6257
6329
  }
6258
6330
  enum SymbolDisplayPartKind {
6259
6331
  aliasName = 0,
@@ -6420,6 +6492,7 @@ declare namespace ts {
6420
6492
  hasAction?: true;
6421
6493
  source?: string;
6422
6494
  sourceDisplay?: SymbolDisplayPart[];
6495
+ labelDetails?: CompletionEntryLabelDetails;
6423
6496
  isRecommended?: true;
6424
6497
  isFromUncheckedFile?: true;
6425
6498
  isPackageJsonImport?: true;
@@ -6434,6 +6507,10 @@ declare namespace ts {
6434
6507
  */
6435
6508
  data?: CompletionEntryData;
6436
6509
  }
6510
+ interface CompletionEntryLabelDetails {
6511
+ detail?: string;
6512
+ description?: string;
6513
+ }
6437
6514
  interface CompletionEntryDetails {
6438
6515
  name: string;
6439
6516
  kind: ScriptElementKind;
@@ -6693,7 +6770,7 @@ declare namespace ts {
6693
6770
  cancellationToken: CancellationToken;
6694
6771
  host: LanguageServiceHost;
6695
6772
  span: TextSpan;
6696
- preferences: InlayHintsOptions;
6773
+ preferences: UserPreferences;
6697
6774
  }
6698
6775
  }
6699
6776
  declare namespace ts {
@@ -6729,30 +6806,36 @@ declare namespace ts {
6729
6806
  * the SourceFile if was not found in the registry.
6730
6807
  *
6731
6808
  * @param fileName The name of the file requested
6732
- * @param compilationSettings Some compilation settings like target affects the
6809
+ * @param compilationSettingsOrHost Some compilation settings like target affects the
6733
6810
  * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
6734
- * multiple copies of the same file for different compilation settings.
6811
+ * multiple copies of the same file for different compilation settings. A minimal
6812
+ * resolution cache is needed to fully define a source file's shape when
6813
+ * the compilation settings include `module: node12`+, so providing a cache host
6814
+ * object should be preferred. A common host is a language service `ConfiguredProject`.
6735
6815
  * @param scriptSnapshot Text of the file. Only used if the file was not found
6736
6816
  * in the registry and a new one was created.
6737
6817
  * @param version Current version of the file. Only used if the file was not found
6738
6818
  * in the registry and a new one was created.
6739
6819
  */
6740
- acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
6741
- acquireDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
6820
+ acquireDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
6821
+ acquireDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
6742
6822
  /**
6743
6823
  * Request an updated version of an already existing SourceFile with a given fileName
6744
6824
  * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile
6745
6825
  * to get an updated SourceFile.
6746
6826
  *
6747
6827
  * @param fileName The name of the file requested
6748
- * @param compilationSettings Some compilation settings like target affects the
6828
+ * @param compilationSettingsOrHost Some compilation settings like target affects the
6749
6829
  * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
6750
- * multiple copies of the same file for different compilation settings.
6830
+ * multiple copies of the same file for different compilation settings. A minimal
6831
+ * resolution cache is needed to fully define a source file's shape when
6832
+ * the compilation settings include `module: node12`+, so providing a cache host
6833
+ * object should be preferred. A common host is a language service `ConfiguredProject`.
6751
6834
  * @param scriptSnapshot Text of the file.
6752
6835
  * @param version Current version of the file.
6753
6836
  */
6754
- updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
6755
- updateDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
6837
+ updateDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
6838
+ updateDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
6756
6839
  getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey;
6757
6840
  /**
6758
6841
  * Informs the DocumentRegistry that a file is not needed any longer.
@@ -6814,7 +6897,7 @@ declare namespace ts {
6814
6897
  function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string;
6815
6898
  function getDefaultCompilerOptions(): CompilerOptions;
6816
6899
  function getSupportedCodeFixes(): string[];
6817
- function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile;
6900
+ function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: ScriptTarget | CreateSourceFileOptions, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile;
6818
6901
  function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean): SourceFile;
6819
6902
  function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService;
6820
6903
  /**
@@ -6878,9 +6961,15 @@ declare namespace ts {
6878
6961
  /** @deprecated Use `factory.updateComputedPropertyName` or the factory supplied by your transformation context instead. */
6879
6962
  const updateComputedPropertyName: (node: ComputedPropertyName, expression: Expression) => ComputedPropertyName;
6880
6963
  /** @deprecated Use `factory.createTypeParameterDeclaration` or the factory supplied by your transformation context instead. */
6881
- const createTypeParameterDeclaration: (name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined) => TypeParameterDeclaration;
6964
+ const createTypeParameterDeclaration: {
6965
+ (modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined): TypeParameterDeclaration;
6966
+ (name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined): TypeParameterDeclaration;
6967
+ };
6882
6968
  /** @deprecated Use `factory.updateTypeParameterDeclaration` or the factory supplied by your transformation context instead. */
6883
- const updateTypeParameterDeclaration: (node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined) => TypeParameterDeclaration;
6969
+ const updateTypeParameterDeclaration: {
6970
+ (node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
6971
+ (node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
6972
+ };
6884
6973
  /** @deprecated Use `factory.createParameterDeclaration` or the factory supplied by your transformation context instead. */
6885
6974
  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
6975
  /** @deprecated Use `factory.updateParameterDeclaration` or the factory supplied by your transformation context instead. */
@@ -6938,9 +7027,9 @@ declare namespace ts {
6938
7027
  /** @deprecated Use `factory.updateConstructorTypeNode` or the factory supplied by your transformation context instead. */
6939
7028
  const updateConstructorTypeNode: (node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => ConstructorTypeNode;
6940
7029
  /** @deprecated Use `factory.createTypeQueryNode` or the factory supplied by your transformation context instead. */
6941
- const createTypeQueryNode: (exprName: EntityName) => TypeQueryNode;
7030
+ const createTypeQueryNode: (exprName: EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeQueryNode;
6942
7031
  /** @deprecated Use `factory.updateTypeQueryNode` or the factory supplied by your transformation context instead. */
6943
- const updateTypeQueryNode: (node: TypeQueryNode, exprName: EntityName) => TypeQueryNode;
7032
+ const updateTypeQueryNode: (node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeQueryNode;
6944
7033
  /** @deprecated Use `factory.createTypeLiteralNode` or the factory supplied by your transformation context instead. */
6945
7034
  const createTypeLiteralNode: (members: readonly TypeElement[] | undefined) => TypeLiteralNode;
6946
7035
  /** @deprecated Use `factory.updateTypeLiteralNode` or the factory supplied by your transformation context instead. */
@@ -6978,9 +7067,15 @@ declare namespace ts {
6978
7067
  /** @deprecated Use `factory.updateInferTypeNode` or the factory supplied by your transformation context instead. */
6979
7068
  const updateInferTypeNode: (node: InferTypeNode, typeParameter: TypeParameterDeclaration) => InferTypeNode;
6980
7069
  /** @deprecated Use `factory.createImportTypeNode` or the factory supplied by your transformation context instead. */
6981
- const createImportTypeNode: (argument: TypeNode, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined) => ImportTypeNode;
7070
+ const createImportTypeNode: {
7071
+ (argument: TypeNode, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode;
7072
+ (argument: TypeNode, assertions?: ImportTypeAssertionContainer | undefined, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode;
7073
+ };
6982
7074
  /** @deprecated Use `factory.updateImportTypeNode` or the factory supplied by your transformation context instead. */
6983
- const updateImportTypeNode: (node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined) => ImportTypeNode;
7075
+ const updateImportTypeNode: {
7076
+ (node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode;
7077
+ (node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode;
7078
+ };
6984
7079
  /** @deprecated Use `factory.createParenthesizedType` or the factory supplied by your transformation context instead. */
6985
7080
  const createParenthesizedType: (type: TypeNode) => ParenthesizedTypeNode;
6986
7081
  /** @deprecated Use `factory.updateParenthesizedType` or the factory supplied by your transformation context instead. */