typescript 4.9.0-dev.20220811 → 4.9.0-dev.20220812

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.
@@ -99,7 +99,7 @@ var ts;
99
99
  // The following is baselined as a literal template type without intervention
100
100
  /** The version of the TypeScript compiler release */
101
101
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
102
- ts.version = ts.versionMajorMinor + ".0-dev.20220811";
102
+ ts.version = ts.versionMajorMinor + ".0-dev.20220812";
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -3553,6 +3553,8 @@ var ts;
3553
3553
  typeof performance.mark === "function" &&
3554
3554
  typeof performance.measure === "function" &&
3555
3555
  typeof performance.now === "function" &&
3556
+ typeof performance.clearMarks === "function" &&
3557
+ typeof performance.clearMeasures === "function" &&
3556
3558
  typeof PerformanceObserver === "function";
3557
3559
  }
3558
3560
  function tryGetWebPerformanceHooks() {
@@ -3597,7 +3599,9 @@ var ts;
3597
3599
  if (end === "__performance.measure-fix__") {
3598
3600
  nodePerformance_1.clearMarks("__performance.measure-fix__");
3599
3601
  }
3600
- }
3602
+ },
3603
+ clearMarks: function (name) { return nodePerformance_1.clearMarks(name); },
3604
+ clearMeasures: function (name) { return nodePerformance_1.clearMeasures(name); },
3601
3605
  };
3602
3606
  }
3603
3607
  return {
@@ -3730,6 +3734,30 @@ var ts;
3730
3734
  durations.forEach(function (duration, measureName) { return cb(measureName, duration); });
3731
3735
  }
3732
3736
  performance.forEachMeasure = forEachMeasure;
3737
+ function forEachMark(cb) {
3738
+ marks.forEach(function (_time, markName) { return cb(markName); });
3739
+ }
3740
+ performance.forEachMark = forEachMark;
3741
+ function clearMeasures(name) {
3742
+ if (name !== undefined)
3743
+ durations.delete(name);
3744
+ else
3745
+ durations.clear();
3746
+ performanceImpl === null || performanceImpl === void 0 ? void 0 : performanceImpl.clearMeasures(name);
3747
+ }
3748
+ performance.clearMeasures = clearMeasures;
3749
+ function clearMarks(name) {
3750
+ if (name !== undefined) {
3751
+ counts.delete(name);
3752
+ marks.delete(name);
3753
+ }
3754
+ else {
3755
+ counts.clear();
3756
+ marks.clear();
3757
+ }
3758
+ performanceImpl === null || performanceImpl === void 0 ? void 0 : performanceImpl.clearMarks(name);
3759
+ }
3760
+ performance.clearMarks = clearMarks;
3733
3761
  /**
3734
3762
  * Indicates whether the performance API is enabled.
3735
3763
  */
@@ -73962,17 +73990,15 @@ var ts;
73962
73990
  var typeParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(intrinsicClassAttribs.symbol);
73963
73991
  var hostClassType = getReturnTypeOfSignature(sig);
73964
73992
  var libraryManagedAttributeType = void 0;
73965
- if (typeParams && typeParams.length === 1) {
73993
+ if (typeParams) {
73994
+ // apply JSX.IntrinsicClassElements<hostClassType, ...>
73966
73995
  var inferredArgs = fillMissingTypeArguments([hostClassType], typeParams, getMinTypeArgumentCount(typeParams), ts.isInJSFile(context));
73967
73996
  libraryManagedAttributeType = instantiateType(intrinsicClassAttribs, createTypeMapper(typeParams, inferredArgs));
73968
73997
  }
73969
- else if (typeParams)
73970
- libraryManagedAttributeType = undefined;
73998
+ // or JSX.IntrinsicClassElements has no generics.
73971
73999
  else
73972
74000
  libraryManagedAttributeType = intrinsicClassAttribs;
73973
- if (libraryManagedAttributeType) {
73974
- apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType);
73975
- }
74001
+ apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType);
73976
74002
  }
73977
74003
  var intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes, context);
73978
74004
  if (!isErrorType(intrinsicAttribs)) {
@@ -126054,6 +126080,7 @@ var ts;
126054
126080
  if (value) {
126055
126081
  return isParsedCommandLine(value) ? value : undefined;
126056
126082
  }
126083
+ ts.performance.mark("SolutionBuilder::beforeConfigFileParsing");
126057
126084
  var diagnostic;
126058
126085
  var parseConfigFileHost = state.parseConfigFileHost, baseCompilerOptions = state.baseCompilerOptions, baseWatchOptions = state.baseWatchOptions, extendedConfigCache = state.extendedConfigCache, host = state.host;
126059
126086
  var parsed;
@@ -126068,6 +126095,8 @@ var ts;
126068
126095
  parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = ts.noop;
126069
126096
  }
126070
126097
  configFileCache.set(configFilePath, parsed || diagnostic);
126098
+ ts.performance.mark("SolutionBuilder::afterConfigFileParsing");
126099
+ ts.performance.measure("SolutionBuilder::Config file parsing", "SolutionBuilder::beforeConfigFileParsing", "SolutionBuilder::afterConfigFileParsing");
126071
126100
  return parsed;
126072
126101
  }
126073
126102
  function resolveProjectName(state, name) {
@@ -126267,6 +126296,7 @@ var ts;
126267
126296
  if (updateOutputFileStampsPending) {
126268
126297
  updateOutputTimestamps(state, config, projectPath);
126269
126298
  }
126299
+ ts.performance.mark("SolutionBuilder::Timestamps only updates");
126270
126300
  return doneInvalidatedProject(state, projectPath);
126271
126301
  }
126272
126302
  };
@@ -126360,6 +126390,10 @@ var ts;
126360
126390
  };
126361
126391
  function done(cancellationToken, writeFile, customTransformers) {
126362
126392
  executeSteps(BuildStep.Done, cancellationToken, writeFile, customTransformers);
126393
+ if (kind === InvalidatedProjectKind.Build)
126394
+ ts.performance.mark("SolutionBuilder::Projects built");
126395
+ else
126396
+ ts.performance.mark("SolutionBuilder::Bundles updated");
126363
126397
  return doneInvalidatedProject(state, projectPath);
126364
126398
  }
126365
126399
  function withProgramOrUndefined(action) {
@@ -127132,7 +127166,10 @@ var ts;
127132
127166
  if (prior !== undefined) {
127133
127167
  return prior;
127134
127168
  }
127169
+ ts.performance.mark("SolutionBuilder::beforeUpToDateCheck");
127135
127170
  var actual = getUpToDateStatusWorker(state, project, resolvedPath);
127171
+ ts.performance.mark("SolutionBuilder::afterUpToDateCheck");
127172
+ ts.performance.measure("SolutionBuilder::Up-to-date check", "SolutionBuilder::beforeUpToDateCheck", "SolutionBuilder::afterUpToDateCheck");
127136
127173
  state.projectStatus.set(resolvedPath, actual);
127137
127174
  return actual;
127138
127175
  }
@@ -127270,6 +127307,13 @@ var ts;
127270
127307
  }
127271
127308
  }
127272
127309
  function build(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences) {
127310
+ ts.performance.mark("SolutionBuilder::beforeBuild");
127311
+ var result = buildWorker(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences);
127312
+ ts.performance.mark("SolutionBuilder::afterBuild");
127313
+ ts.performance.measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
127314
+ return result;
127315
+ }
127316
+ function buildWorker(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences) {
127273
127317
  var buildOrder = getBuildOrderFor(state, project, onlyReferences);
127274
127318
  if (!buildOrder)
127275
127319
  return ts.ExitStatus.InvalidProject_OutputsSkipped;
@@ -127297,6 +127341,13 @@ var ts;
127297
127341
  : ts.ExitStatus.DiagnosticsPresent_OutputsSkipped;
127298
127342
  }
127299
127343
  function clean(state, project, onlyReferences) {
127344
+ ts.performance.mark("SolutionBuilder::beforeClean");
127345
+ var result = cleanWorker(state, project, onlyReferences);
127346
+ ts.performance.mark("SolutionBuilder::afterClean");
127347
+ ts.performance.measure("SolutionBuilder::Clean", "SolutionBuilder::beforeClean", "SolutionBuilder::afterClean");
127348
+ return result;
127349
+ }
127350
+ function cleanWorker(state, project, onlyReferences) {
127300
127351
  var buildOrder = getBuildOrderFor(state, project, onlyReferences);
127301
127352
  if (!buildOrder)
127302
127353
  return ts.ExitStatus.InvalidProject_OutputsSkipped;
@@ -127370,6 +127421,14 @@ var ts;
127370
127421
  state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
127371
127422
  }
127372
127423
  function buildNextInvalidatedProject(state, changeDetected) {
127424
+ ts.performance.mark("SolutionBuilder::beforeBuild");
127425
+ var buildOrder = buildNextInvalidatedProjectWorker(state, changeDetected);
127426
+ ts.performance.mark("SolutionBuilder::afterBuild");
127427
+ ts.performance.measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
127428
+ if (buildOrder)
127429
+ reportErrorSummary(state, buildOrder);
127430
+ }
127431
+ function buildNextInvalidatedProjectWorker(state, changeDetected) {
127373
127432
  state.timerToBuildInvalidatedProject = undefined;
127374
127433
  if (state.reportFileChangeDetected) {
127375
127434
  state.reportFileChangeDetected = false;
@@ -127402,7 +127461,7 @@ var ts;
127402
127461
  }
127403
127462
  }
127404
127463
  disableCache(state);
127405
- reportErrorSummary(state, buildOrder);
127464
+ return buildOrder;
127406
127465
  }
127407
127466
  function watchConfigFile(state, resolved, resolvedPath, parsed) {
127408
127467
  if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
@@ -127457,6 +127516,7 @@ var ts;
127457
127516
  function startWatching(state, buildOrder) {
127458
127517
  if (!state.watchAllProjectsPending)
127459
127518
  return;
127519
+ ts.performance.mark("SolutionBuilder::beforeWatcherCreation");
127460
127520
  state.watchAllProjectsPending = false;
127461
127521
  for (var _i = 0, _a = getBuildOrderFromAnyBuildOrder(buildOrder); _i < _a.length; _i++) {
127462
127522
  var resolved = _a[_i];
@@ -127474,6 +127534,8 @@ var ts;
127474
127534
  watchPackageJsonFiles(state, resolved, resolvedPath, cfg);
127475
127535
  }
127476
127536
  }
127537
+ ts.performance.mark("SolutionBuilder::afterWatcherCreation");
127538
+ ts.performance.measure("SolutionBuilder::Watcher creation", "SolutionBuilder::beforeWatcherCreation", "SolutionBuilder::afterWatcherCreation");
127477
127539
  }
127478
127540
  function stopWatching(state) {
127479
127541
  ts.clearMap(state.allWatchedConfigFiles, ts.closeFileWatcher);
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = ts.versionMajorMinor + ".0-dev.20220811";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20220812";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -3543,6 +3543,8 @@ var ts;
3543
3543
  typeof performance.mark === "function" &&
3544
3544
  typeof performance.measure === "function" &&
3545
3545
  typeof performance.now === "function" &&
3546
+ typeof performance.clearMarks === "function" &&
3547
+ typeof performance.clearMeasures === "function" &&
3546
3548
  typeof PerformanceObserver === "function";
3547
3549
  }
3548
3550
  function tryGetWebPerformanceHooks() {
@@ -3587,7 +3589,9 @@ var ts;
3587
3589
  if (end === "__performance.measure-fix__") {
3588
3590
  nodePerformance_1.clearMarks("__performance.measure-fix__");
3589
3591
  }
3590
- }
3592
+ },
3593
+ clearMarks: function (name) { return nodePerformance_1.clearMarks(name); },
3594
+ clearMeasures: function (name) { return nodePerformance_1.clearMeasures(name); },
3591
3595
  };
3592
3596
  }
3593
3597
  return {
@@ -3720,6 +3724,30 @@ var ts;
3720
3724
  durations.forEach(function (duration, measureName) { return cb(measureName, duration); });
3721
3725
  }
3722
3726
  performance.forEachMeasure = forEachMeasure;
3727
+ function forEachMark(cb) {
3728
+ marks.forEach(function (_time, markName) { return cb(markName); });
3729
+ }
3730
+ performance.forEachMark = forEachMark;
3731
+ function clearMeasures(name) {
3732
+ if (name !== undefined)
3733
+ durations.delete(name);
3734
+ else
3735
+ durations.clear();
3736
+ performanceImpl === null || performanceImpl === void 0 ? void 0 : performanceImpl.clearMeasures(name);
3737
+ }
3738
+ performance.clearMeasures = clearMeasures;
3739
+ function clearMarks(name) {
3740
+ if (name !== undefined) {
3741
+ counts.delete(name);
3742
+ marks.delete(name);
3743
+ }
3744
+ else {
3745
+ counts.clear();
3746
+ marks.clear();
3747
+ }
3748
+ performanceImpl === null || performanceImpl === void 0 ? void 0 : performanceImpl.clearMarks(name);
3749
+ }
3750
+ performance.clearMarks = clearMarks;
3723
3751
  /**
3724
3752
  * Indicates whether the performance API is enabled.
3725
3753
  */
@@ -73952,17 +73980,15 @@ var ts;
73952
73980
  var typeParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(intrinsicClassAttribs.symbol);
73953
73981
  var hostClassType = getReturnTypeOfSignature(sig);
73954
73982
  var libraryManagedAttributeType = void 0;
73955
- if (typeParams && typeParams.length === 1) {
73983
+ if (typeParams) {
73984
+ // apply JSX.IntrinsicClassElements<hostClassType, ...>
73956
73985
  var inferredArgs = fillMissingTypeArguments([hostClassType], typeParams, getMinTypeArgumentCount(typeParams), ts.isInJSFile(context));
73957
73986
  libraryManagedAttributeType = instantiateType(intrinsicClassAttribs, createTypeMapper(typeParams, inferredArgs));
73958
73987
  }
73959
- else if (typeParams)
73960
- libraryManagedAttributeType = undefined;
73988
+ // or JSX.IntrinsicClassElements has no generics.
73961
73989
  else
73962
73990
  libraryManagedAttributeType = intrinsicClassAttribs;
73963
- if (libraryManagedAttributeType) {
73964
- apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType);
73965
- }
73991
+ apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType);
73966
73992
  }
73967
73993
  var intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes, context);
73968
73994
  if (!isErrorType(intrinsicAttribs)) {
@@ -126044,6 +126070,7 @@ var ts;
126044
126070
  if (value) {
126045
126071
  return isParsedCommandLine(value) ? value : undefined;
126046
126072
  }
126073
+ ts.performance.mark("SolutionBuilder::beforeConfigFileParsing");
126047
126074
  var diagnostic;
126048
126075
  var parseConfigFileHost = state.parseConfigFileHost, baseCompilerOptions = state.baseCompilerOptions, baseWatchOptions = state.baseWatchOptions, extendedConfigCache = state.extendedConfigCache, host = state.host;
126049
126076
  var parsed;
@@ -126058,6 +126085,8 @@ var ts;
126058
126085
  parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = ts.noop;
126059
126086
  }
126060
126087
  configFileCache.set(configFilePath, parsed || diagnostic);
126088
+ ts.performance.mark("SolutionBuilder::afterConfigFileParsing");
126089
+ ts.performance.measure("SolutionBuilder::Config file parsing", "SolutionBuilder::beforeConfigFileParsing", "SolutionBuilder::afterConfigFileParsing");
126061
126090
  return parsed;
126062
126091
  }
126063
126092
  function resolveProjectName(state, name) {
@@ -126257,6 +126286,7 @@ var ts;
126257
126286
  if (updateOutputFileStampsPending) {
126258
126287
  updateOutputTimestamps(state, config, projectPath);
126259
126288
  }
126289
+ ts.performance.mark("SolutionBuilder::Timestamps only updates");
126260
126290
  return doneInvalidatedProject(state, projectPath);
126261
126291
  }
126262
126292
  };
@@ -126350,6 +126380,10 @@ var ts;
126350
126380
  };
126351
126381
  function done(cancellationToken, writeFile, customTransformers) {
126352
126382
  executeSteps(BuildStep.Done, cancellationToken, writeFile, customTransformers);
126383
+ if (kind === InvalidatedProjectKind.Build)
126384
+ ts.performance.mark("SolutionBuilder::Projects built");
126385
+ else
126386
+ ts.performance.mark("SolutionBuilder::Bundles updated");
126353
126387
  return doneInvalidatedProject(state, projectPath);
126354
126388
  }
126355
126389
  function withProgramOrUndefined(action) {
@@ -127122,7 +127156,10 @@ var ts;
127122
127156
  if (prior !== undefined) {
127123
127157
  return prior;
127124
127158
  }
127159
+ ts.performance.mark("SolutionBuilder::beforeUpToDateCheck");
127125
127160
  var actual = getUpToDateStatusWorker(state, project, resolvedPath);
127161
+ ts.performance.mark("SolutionBuilder::afterUpToDateCheck");
127162
+ ts.performance.measure("SolutionBuilder::Up-to-date check", "SolutionBuilder::beforeUpToDateCheck", "SolutionBuilder::afterUpToDateCheck");
127126
127163
  state.projectStatus.set(resolvedPath, actual);
127127
127164
  return actual;
127128
127165
  }
@@ -127260,6 +127297,13 @@ var ts;
127260
127297
  }
127261
127298
  }
127262
127299
  function build(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences) {
127300
+ ts.performance.mark("SolutionBuilder::beforeBuild");
127301
+ var result = buildWorker(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences);
127302
+ ts.performance.mark("SolutionBuilder::afterBuild");
127303
+ ts.performance.measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
127304
+ return result;
127305
+ }
127306
+ function buildWorker(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences) {
127263
127307
  var buildOrder = getBuildOrderFor(state, project, onlyReferences);
127264
127308
  if (!buildOrder)
127265
127309
  return ts.ExitStatus.InvalidProject_OutputsSkipped;
@@ -127287,6 +127331,13 @@ var ts;
127287
127331
  : ts.ExitStatus.DiagnosticsPresent_OutputsSkipped;
127288
127332
  }
127289
127333
  function clean(state, project, onlyReferences) {
127334
+ ts.performance.mark("SolutionBuilder::beforeClean");
127335
+ var result = cleanWorker(state, project, onlyReferences);
127336
+ ts.performance.mark("SolutionBuilder::afterClean");
127337
+ ts.performance.measure("SolutionBuilder::Clean", "SolutionBuilder::beforeClean", "SolutionBuilder::afterClean");
127338
+ return result;
127339
+ }
127340
+ function cleanWorker(state, project, onlyReferences) {
127290
127341
  var buildOrder = getBuildOrderFor(state, project, onlyReferences);
127291
127342
  if (!buildOrder)
127292
127343
  return ts.ExitStatus.InvalidProject_OutputsSkipped;
@@ -127360,6 +127411,14 @@ var ts;
127360
127411
  state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
127361
127412
  }
127362
127413
  function buildNextInvalidatedProject(state, changeDetected) {
127414
+ ts.performance.mark("SolutionBuilder::beforeBuild");
127415
+ var buildOrder = buildNextInvalidatedProjectWorker(state, changeDetected);
127416
+ ts.performance.mark("SolutionBuilder::afterBuild");
127417
+ ts.performance.measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
127418
+ if (buildOrder)
127419
+ reportErrorSummary(state, buildOrder);
127420
+ }
127421
+ function buildNextInvalidatedProjectWorker(state, changeDetected) {
127363
127422
  state.timerToBuildInvalidatedProject = undefined;
127364
127423
  if (state.reportFileChangeDetected) {
127365
127424
  state.reportFileChangeDetected = false;
@@ -127392,7 +127451,7 @@ var ts;
127392
127451
  }
127393
127452
  }
127394
127453
  disableCache(state);
127395
- reportErrorSummary(state, buildOrder);
127454
+ return buildOrder;
127396
127455
  }
127397
127456
  function watchConfigFile(state, resolved, resolvedPath, parsed) {
127398
127457
  if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
@@ -127447,6 +127506,7 @@ var ts;
127447
127506
  function startWatching(state, buildOrder) {
127448
127507
  if (!state.watchAllProjectsPending)
127449
127508
  return;
127509
+ ts.performance.mark("SolutionBuilder::beforeWatcherCreation");
127450
127510
  state.watchAllProjectsPending = false;
127451
127511
  for (var _i = 0, _a = getBuildOrderFromAnyBuildOrder(buildOrder); _i < _a.length; _i++) {
127452
127512
  var resolved = _a[_i];
@@ -127464,6 +127524,8 @@ var ts;
127464
127524
  watchPackageJsonFiles(state, resolved, resolvedPath, cfg);
127465
127525
  }
127466
127526
  }
127527
+ ts.performance.mark("SolutionBuilder::afterWatcherCreation");
127528
+ ts.performance.measure("SolutionBuilder::Watcher creation", "SolutionBuilder::beforeWatcherCreation", "SolutionBuilder::afterWatcherCreation");
127467
127529
  }
127468
127530
  function stopWatching(state) {
127469
127531
  ts.clearMap(state.allWatchedConfigFiles, ts.closeFileWatcher);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "4.9.0-dev.20220811",
5
+ "version": "4.9.0-dev.20220812",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [