typescript 4.9.0-dev.20220811 → 4.9.0-dev.20220814

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/lib/typescript.js CHANGED
@@ -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.20220814";
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
  */
@@ -73532,25 +73560,7 @@ var ts;
73532
73560
  }
73533
73561
  function getTypeOfPropertyOfContextualType(type, name, nameType) {
73534
73562
  return mapType(type, function (t) {
73535
- if (t.flags & 2097152 /* Intersection */) {
73536
- var intersection = t;
73537
- var newTypes = ts.mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
73538
- if (newTypes.length > 0) {
73539
- return getIntersectionType(newTypes);
73540
- }
73541
- newTypes = ts.mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
73542
- if (newTypes.length > 0) {
73543
- return getIntersectionType(newTypes);
73544
- }
73545
- return undefined;
73546
- }
73547
- var concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
73548
- if (concretePropertyType) {
73549
- return concretePropertyType;
73550
- }
73551
- return getTypeOfApplicableIndexInfoOfContextualType(t);
73552
- }, /*noReductions*/ true);
73553
- function getTypeOfConcretePropertyOfContextualType(t) {
73563
+ var _a;
73554
73564
  if (isGenericMappedType(t) && !t.declaration.nameType) {
73555
73565
  var constraint = getConstraintTypeFromMappedType(t);
73556
73566
  var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
@@ -73558,9 +73568,8 @@ var ts;
73558
73568
  if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
73559
73569
  return substituteIndexedMappedType(t, propertyNameType);
73560
73570
  }
73561
- return undefined;
73562
73571
  }
73563
- if (t.flags & 3670016 /* StructuredType */) {
73572
+ else if (t.flags & 3670016 /* StructuredType */) {
73564
73573
  var prop = getPropertyOfType(t, name);
73565
73574
  if (prop) {
73566
73575
  return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
@@ -73571,16 +73580,10 @@ var ts;
73571
73580
  return restType;
73572
73581
  }
73573
73582
  }
73583
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73574
73584
  }
73575
73585
  return undefined;
73576
- }
73577
- function getTypeOfApplicableIndexInfoOfContextualType(t) {
73578
- var _a;
73579
- if (!(t.flags & 3670016 /* StructuredType */)) {
73580
- return undefined;
73581
- }
73582
- return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73583
- }
73586
+ }, /*noReductions*/ true);
73584
73587
  }
73585
73588
  // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of
73586
73589
  // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one
@@ -73962,17 +73965,15 @@ var ts;
73962
73965
  var typeParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(intrinsicClassAttribs.symbol);
73963
73966
  var hostClassType = getReturnTypeOfSignature(sig);
73964
73967
  var libraryManagedAttributeType = void 0;
73965
- if (typeParams && typeParams.length === 1) {
73968
+ if (typeParams) {
73969
+ // apply JSX.IntrinsicClassElements<hostClassType, ...>
73966
73970
  var inferredArgs = fillMissingTypeArguments([hostClassType], typeParams, getMinTypeArgumentCount(typeParams), ts.isInJSFile(context));
73967
73971
  libraryManagedAttributeType = instantiateType(intrinsicClassAttribs, createTypeMapper(typeParams, inferredArgs));
73968
73972
  }
73969
- else if (typeParams)
73970
- libraryManagedAttributeType = undefined;
73973
+ // or JSX.IntrinsicClassElements has no generics.
73971
73974
  else
73972
73975
  libraryManagedAttributeType = intrinsicClassAttribs;
73973
- if (libraryManagedAttributeType) {
73974
- apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType);
73975
- }
73976
+ apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType);
73976
73977
  }
73977
73978
  var intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes, context);
73978
73979
  if (!isErrorType(intrinsicAttribs)) {
@@ -126054,6 +126055,7 @@ var ts;
126054
126055
  if (value) {
126055
126056
  return isParsedCommandLine(value) ? value : undefined;
126056
126057
  }
126058
+ ts.performance.mark("SolutionBuilder::beforeConfigFileParsing");
126057
126059
  var diagnostic;
126058
126060
  var parseConfigFileHost = state.parseConfigFileHost, baseCompilerOptions = state.baseCompilerOptions, baseWatchOptions = state.baseWatchOptions, extendedConfigCache = state.extendedConfigCache, host = state.host;
126059
126061
  var parsed;
@@ -126068,6 +126070,8 @@ var ts;
126068
126070
  parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = ts.noop;
126069
126071
  }
126070
126072
  configFileCache.set(configFilePath, parsed || diagnostic);
126073
+ ts.performance.mark("SolutionBuilder::afterConfigFileParsing");
126074
+ ts.performance.measure("SolutionBuilder::Config file parsing", "SolutionBuilder::beforeConfigFileParsing", "SolutionBuilder::afterConfigFileParsing");
126071
126075
  return parsed;
126072
126076
  }
126073
126077
  function resolveProjectName(state, name) {
@@ -126267,6 +126271,7 @@ var ts;
126267
126271
  if (updateOutputFileStampsPending) {
126268
126272
  updateOutputTimestamps(state, config, projectPath);
126269
126273
  }
126274
+ ts.performance.mark("SolutionBuilder::Timestamps only updates");
126270
126275
  return doneInvalidatedProject(state, projectPath);
126271
126276
  }
126272
126277
  };
@@ -126360,6 +126365,10 @@ var ts;
126360
126365
  };
126361
126366
  function done(cancellationToken, writeFile, customTransformers) {
126362
126367
  executeSteps(BuildStep.Done, cancellationToken, writeFile, customTransformers);
126368
+ if (kind === InvalidatedProjectKind.Build)
126369
+ ts.performance.mark("SolutionBuilder::Projects built");
126370
+ else
126371
+ ts.performance.mark("SolutionBuilder::Bundles updated");
126363
126372
  return doneInvalidatedProject(state, projectPath);
126364
126373
  }
126365
126374
  function withProgramOrUndefined(action) {
@@ -127132,7 +127141,10 @@ var ts;
127132
127141
  if (prior !== undefined) {
127133
127142
  return prior;
127134
127143
  }
127144
+ ts.performance.mark("SolutionBuilder::beforeUpToDateCheck");
127135
127145
  var actual = getUpToDateStatusWorker(state, project, resolvedPath);
127146
+ ts.performance.mark("SolutionBuilder::afterUpToDateCheck");
127147
+ ts.performance.measure("SolutionBuilder::Up-to-date check", "SolutionBuilder::beforeUpToDateCheck", "SolutionBuilder::afterUpToDateCheck");
127136
127148
  state.projectStatus.set(resolvedPath, actual);
127137
127149
  return actual;
127138
127150
  }
@@ -127270,6 +127282,13 @@ var ts;
127270
127282
  }
127271
127283
  }
127272
127284
  function build(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences) {
127285
+ ts.performance.mark("SolutionBuilder::beforeBuild");
127286
+ var result = buildWorker(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences);
127287
+ ts.performance.mark("SolutionBuilder::afterBuild");
127288
+ ts.performance.measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
127289
+ return result;
127290
+ }
127291
+ function buildWorker(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences) {
127273
127292
  var buildOrder = getBuildOrderFor(state, project, onlyReferences);
127274
127293
  if (!buildOrder)
127275
127294
  return ts.ExitStatus.InvalidProject_OutputsSkipped;
@@ -127297,6 +127316,13 @@ var ts;
127297
127316
  : ts.ExitStatus.DiagnosticsPresent_OutputsSkipped;
127298
127317
  }
127299
127318
  function clean(state, project, onlyReferences) {
127319
+ ts.performance.mark("SolutionBuilder::beforeClean");
127320
+ var result = cleanWorker(state, project, onlyReferences);
127321
+ ts.performance.mark("SolutionBuilder::afterClean");
127322
+ ts.performance.measure("SolutionBuilder::Clean", "SolutionBuilder::beforeClean", "SolutionBuilder::afterClean");
127323
+ return result;
127324
+ }
127325
+ function cleanWorker(state, project, onlyReferences) {
127300
127326
  var buildOrder = getBuildOrderFor(state, project, onlyReferences);
127301
127327
  if (!buildOrder)
127302
127328
  return ts.ExitStatus.InvalidProject_OutputsSkipped;
@@ -127370,6 +127396,14 @@ var ts;
127370
127396
  state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
127371
127397
  }
127372
127398
  function buildNextInvalidatedProject(state, changeDetected) {
127399
+ ts.performance.mark("SolutionBuilder::beforeBuild");
127400
+ var buildOrder = buildNextInvalidatedProjectWorker(state, changeDetected);
127401
+ ts.performance.mark("SolutionBuilder::afterBuild");
127402
+ ts.performance.measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
127403
+ if (buildOrder)
127404
+ reportErrorSummary(state, buildOrder);
127405
+ }
127406
+ function buildNextInvalidatedProjectWorker(state, changeDetected) {
127373
127407
  state.timerToBuildInvalidatedProject = undefined;
127374
127408
  if (state.reportFileChangeDetected) {
127375
127409
  state.reportFileChangeDetected = false;
@@ -127402,7 +127436,7 @@ var ts;
127402
127436
  }
127403
127437
  }
127404
127438
  disableCache(state);
127405
- reportErrorSummary(state, buildOrder);
127439
+ return buildOrder;
127406
127440
  }
127407
127441
  function watchConfigFile(state, resolved, resolvedPath, parsed) {
127408
127442
  if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
@@ -127457,6 +127491,7 @@ var ts;
127457
127491
  function startWatching(state, buildOrder) {
127458
127492
  if (!state.watchAllProjectsPending)
127459
127493
  return;
127494
+ ts.performance.mark("SolutionBuilder::beforeWatcherCreation");
127460
127495
  state.watchAllProjectsPending = false;
127461
127496
  for (var _i = 0, _a = getBuildOrderFromAnyBuildOrder(buildOrder); _i < _a.length; _i++) {
127462
127497
  var resolved = _a[_i];
@@ -127474,6 +127509,8 @@ var ts;
127474
127509
  watchPackageJsonFiles(state, resolved, resolvedPath, cfg);
127475
127510
  }
127476
127511
  }
127512
+ ts.performance.mark("SolutionBuilder::afterWatcherCreation");
127513
+ ts.performance.measure("SolutionBuilder::Watcher creation", "SolutionBuilder::beforeWatcherCreation", "SolutionBuilder::afterWatcherCreation");
127477
127514
  }
127478
127515
  function stopWatching(state) {
127479
127516
  ts.clearMap(state.allWatchedConfigFiles, ts.closeFileWatcher);
@@ -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.20220814";
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
  */
@@ -73532,25 +73560,7 @@ var ts;
73532
73560
  }
73533
73561
  function getTypeOfPropertyOfContextualType(type, name, nameType) {
73534
73562
  return mapType(type, function (t) {
73535
- if (t.flags & 2097152 /* Intersection */) {
73536
- var intersection = t;
73537
- var newTypes = ts.mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
73538
- if (newTypes.length > 0) {
73539
- return getIntersectionType(newTypes);
73540
- }
73541
- newTypes = ts.mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
73542
- if (newTypes.length > 0) {
73543
- return getIntersectionType(newTypes);
73544
- }
73545
- return undefined;
73546
- }
73547
- var concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
73548
- if (concretePropertyType) {
73549
- return concretePropertyType;
73550
- }
73551
- return getTypeOfApplicableIndexInfoOfContextualType(t);
73552
- }, /*noReductions*/ true);
73553
- function getTypeOfConcretePropertyOfContextualType(t) {
73563
+ var _a;
73554
73564
  if (isGenericMappedType(t) && !t.declaration.nameType) {
73555
73565
  var constraint = getConstraintTypeFromMappedType(t);
73556
73566
  var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
@@ -73558,9 +73568,8 @@ var ts;
73558
73568
  if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
73559
73569
  return substituteIndexedMappedType(t, propertyNameType);
73560
73570
  }
73561
- return undefined;
73562
73571
  }
73563
- if (t.flags & 3670016 /* StructuredType */) {
73572
+ else if (t.flags & 3670016 /* StructuredType */) {
73564
73573
  var prop = getPropertyOfType(t, name);
73565
73574
  if (prop) {
73566
73575
  return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
@@ -73571,16 +73580,10 @@ var ts;
73571
73580
  return restType;
73572
73581
  }
73573
73582
  }
73583
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73574
73584
  }
73575
73585
  return undefined;
73576
- }
73577
- function getTypeOfApplicableIndexInfoOfContextualType(t) {
73578
- var _a;
73579
- if (!(t.flags & 3670016 /* StructuredType */)) {
73580
- return undefined;
73581
- }
73582
- return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73583
- }
73586
+ }, /*noReductions*/ true);
73584
73587
  }
73585
73588
  // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of
73586
73589
  // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one
@@ -73962,17 +73965,15 @@ var ts;
73962
73965
  var typeParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(intrinsicClassAttribs.symbol);
73963
73966
  var hostClassType = getReturnTypeOfSignature(sig);
73964
73967
  var libraryManagedAttributeType = void 0;
73965
- if (typeParams && typeParams.length === 1) {
73968
+ if (typeParams) {
73969
+ // apply JSX.IntrinsicClassElements<hostClassType, ...>
73966
73970
  var inferredArgs = fillMissingTypeArguments([hostClassType], typeParams, getMinTypeArgumentCount(typeParams), ts.isInJSFile(context));
73967
73971
  libraryManagedAttributeType = instantiateType(intrinsicClassAttribs, createTypeMapper(typeParams, inferredArgs));
73968
73972
  }
73969
- else if (typeParams)
73970
- libraryManagedAttributeType = undefined;
73973
+ // or JSX.IntrinsicClassElements has no generics.
73971
73974
  else
73972
73975
  libraryManagedAttributeType = intrinsicClassAttribs;
73973
- if (libraryManagedAttributeType) {
73974
- apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType);
73975
- }
73976
+ apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType);
73976
73977
  }
73977
73978
  var intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes, context);
73978
73979
  if (!isErrorType(intrinsicAttribs)) {
@@ -126054,6 +126055,7 @@ var ts;
126054
126055
  if (value) {
126055
126056
  return isParsedCommandLine(value) ? value : undefined;
126056
126057
  }
126058
+ ts.performance.mark("SolutionBuilder::beforeConfigFileParsing");
126057
126059
  var diagnostic;
126058
126060
  var parseConfigFileHost = state.parseConfigFileHost, baseCompilerOptions = state.baseCompilerOptions, baseWatchOptions = state.baseWatchOptions, extendedConfigCache = state.extendedConfigCache, host = state.host;
126059
126061
  var parsed;
@@ -126068,6 +126070,8 @@ var ts;
126068
126070
  parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = ts.noop;
126069
126071
  }
126070
126072
  configFileCache.set(configFilePath, parsed || diagnostic);
126073
+ ts.performance.mark("SolutionBuilder::afterConfigFileParsing");
126074
+ ts.performance.measure("SolutionBuilder::Config file parsing", "SolutionBuilder::beforeConfigFileParsing", "SolutionBuilder::afterConfigFileParsing");
126071
126075
  return parsed;
126072
126076
  }
126073
126077
  function resolveProjectName(state, name) {
@@ -126267,6 +126271,7 @@ var ts;
126267
126271
  if (updateOutputFileStampsPending) {
126268
126272
  updateOutputTimestamps(state, config, projectPath);
126269
126273
  }
126274
+ ts.performance.mark("SolutionBuilder::Timestamps only updates");
126270
126275
  return doneInvalidatedProject(state, projectPath);
126271
126276
  }
126272
126277
  };
@@ -126360,6 +126365,10 @@ var ts;
126360
126365
  };
126361
126366
  function done(cancellationToken, writeFile, customTransformers) {
126362
126367
  executeSteps(BuildStep.Done, cancellationToken, writeFile, customTransformers);
126368
+ if (kind === InvalidatedProjectKind.Build)
126369
+ ts.performance.mark("SolutionBuilder::Projects built");
126370
+ else
126371
+ ts.performance.mark("SolutionBuilder::Bundles updated");
126363
126372
  return doneInvalidatedProject(state, projectPath);
126364
126373
  }
126365
126374
  function withProgramOrUndefined(action) {
@@ -127132,7 +127141,10 @@ var ts;
127132
127141
  if (prior !== undefined) {
127133
127142
  return prior;
127134
127143
  }
127144
+ ts.performance.mark("SolutionBuilder::beforeUpToDateCheck");
127135
127145
  var actual = getUpToDateStatusWorker(state, project, resolvedPath);
127146
+ ts.performance.mark("SolutionBuilder::afterUpToDateCheck");
127147
+ ts.performance.measure("SolutionBuilder::Up-to-date check", "SolutionBuilder::beforeUpToDateCheck", "SolutionBuilder::afterUpToDateCheck");
127136
127148
  state.projectStatus.set(resolvedPath, actual);
127137
127149
  return actual;
127138
127150
  }
@@ -127270,6 +127282,13 @@ var ts;
127270
127282
  }
127271
127283
  }
127272
127284
  function build(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences) {
127285
+ ts.performance.mark("SolutionBuilder::beforeBuild");
127286
+ var result = buildWorker(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences);
127287
+ ts.performance.mark("SolutionBuilder::afterBuild");
127288
+ ts.performance.measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
127289
+ return result;
127290
+ }
127291
+ function buildWorker(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences) {
127273
127292
  var buildOrder = getBuildOrderFor(state, project, onlyReferences);
127274
127293
  if (!buildOrder)
127275
127294
  return ts.ExitStatus.InvalidProject_OutputsSkipped;
@@ -127297,6 +127316,13 @@ var ts;
127297
127316
  : ts.ExitStatus.DiagnosticsPresent_OutputsSkipped;
127298
127317
  }
127299
127318
  function clean(state, project, onlyReferences) {
127319
+ ts.performance.mark("SolutionBuilder::beforeClean");
127320
+ var result = cleanWorker(state, project, onlyReferences);
127321
+ ts.performance.mark("SolutionBuilder::afterClean");
127322
+ ts.performance.measure("SolutionBuilder::Clean", "SolutionBuilder::beforeClean", "SolutionBuilder::afterClean");
127323
+ return result;
127324
+ }
127325
+ function cleanWorker(state, project, onlyReferences) {
127300
127326
  var buildOrder = getBuildOrderFor(state, project, onlyReferences);
127301
127327
  if (!buildOrder)
127302
127328
  return ts.ExitStatus.InvalidProject_OutputsSkipped;
@@ -127370,6 +127396,14 @@ var ts;
127370
127396
  state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
127371
127397
  }
127372
127398
  function buildNextInvalidatedProject(state, changeDetected) {
127399
+ ts.performance.mark("SolutionBuilder::beforeBuild");
127400
+ var buildOrder = buildNextInvalidatedProjectWorker(state, changeDetected);
127401
+ ts.performance.mark("SolutionBuilder::afterBuild");
127402
+ ts.performance.measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
127403
+ if (buildOrder)
127404
+ reportErrorSummary(state, buildOrder);
127405
+ }
127406
+ function buildNextInvalidatedProjectWorker(state, changeDetected) {
127373
127407
  state.timerToBuildInvalidatedProject = undefined;
127374
127408
  if (state.reportFileChangeDetected) {
127375
127409
  state.reportFileChangeDetected = false;
@@ -127402,7 +127436,7 @@ var ts;
127402
127436
  }
127403
127437
  }
127404
127438
  disableCache(state);
127405
- reportErrorSummary(state, buildOrder);
127439
+ return buildOrder;
127406
127440
  }
127407
127441
  function watchConfigFile(state, resolved, resolvedPath, parsed) {
127408
127442
  if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
@@ -127457,6 +127491,7 @@ var ts;
127457
127491
  function startWatching(state, buildOrder) {
127458
127492
  if (!state.watchAllProjectsPending)
127459
127493
  return;
127494
+ ts.performance.mark("SolutionBuilder::beforeWatcherCreation");
127460
127495
  state.watchAllProjectsPending = false;
127461
127496
  for (var _i = 0, _a = getBuildOrderFromAnyBuildOrder(buildOrder); _i < _a.length; _i++) {
127462
127497
  var resolved = _a[_i];
@@ -127474,6 +127509,8 @@ var ts;
127474
127509
  watchPackageJsonFiles(state, resolved, resolvedPath, cfg);
127475
127510
  }
127476
127511
  }
127512
+ ts.performance.mark("SolutionBuilder::afterWatcherCreation");
127513
+ ts.performance.measure("SolutionBuilder::Watcher creation", "SolutionBuilder::beforeWatcherCreation", "SolutionBuilder::afterWatcherCreation");
127477
127514
  }
127478
127515
  function stopWatching(state) {
127479
127516
  ts.clearMap(state.allWatchedConfigFiles, ts.closeFileWatcher);