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/tsserver.js CHANGED
@@ -109,7 +109,7 @@ var ts;
109
109
  // The following is baselined as a literal template type without intervention
110
110
  /** The version of the TypeScript compiler release */
111
111
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
112
- ts.version = ts.versionMajorMinor + ".0-dev.20220811";
112
+ ts.version = ts.versionMajorMinor + ".0-dev.20220814";
113
113
  /* @internal */
114
114
  var Comparison;
115
115
  (function (Comparison) {
@@ -3563,6 +3563,8 @@ var ts;
3563
3563
  typeof performance.mark === "function" &&
3564
3564
  typeof performance.measure === "function" &&
3565
3565
  typeof performance.now === "function" &&
3566
+ typeof performance.clearMarks === "function" &&
3567
+ typeof performance.clearMeasures === "function" &&
3566
3568
  typeof PerformanceObserver === "function";
3567
3569
  }
3568
3570
  function tryGetWebPerformanceHooks() {
@@ -3607,7 +3609,9 @@ var ts;
3607
3609
  if (end === "__performance.measure-fix__") {
3608
3610
  nodePerformance_1.clearMarks("__performance.measure-fix__");
3609
3611
  }
3610
- }
3612
+ },
3613
+ clearMarks: function (name) { return nodePerformance_1.clearMarks(name); },
3614
+ clearMeasures: function (name) { return nodePerformance_1.clearMeasures(name); },
3611
3615
  };
3612
3616
  }
3613
3617
  return {
@@ -3740,6 +3744,30 @@ var ts;
3740
3744
  durations.forEach(function (duration, measureName) { return cb(measureName, duration); });
3741
3745
  }
3742
3746
  performance.forEachMeasure = forEachMeasure;
3747
+ function forEachMark(cb) {
3748
+ marks.forEach(function (_time, markName) { return cb(markName); });
3749
+ }
3750
+ performance.forEachMark = forEachMark;
3751
+ function clearMeasures(name) {
3752
+ if (name !== undefined)
3753
+ durations.delete(name);
3754
+ else
3755
+ durations.clear();
3756
+ performanceImpl === null || performanceImpl === void 0 ? void 0 : performanceImpl.clearMeasures(name);
3757
+ }
3758
+ performance.clearMeasures = clearMeasures;
3759
+ function clearMarks(name) {
3760
+ if (name !== undefined) {
3761
+ counts.delete(name);
3762
+ marks.delete(name);
3763
+ }
3764
+ else {
3765
+ counts.clear();
3766
+ marks.clear();
3767
+ }
3768
+ performanceImpl === null || performanceImpl === void 0 ? void 0 : performanceImpl.clearMarks(name);
3769
+ }
3770
+ performance.clearMarks = clearMarks;
3743
3771
  /**
3744
3772
  * Indicates whether the performance API is enabled.
3745
3773
  */
@@ -73542,25 +73570,7 @@ var ts;
73542
73570
  }
73543
73571
  function getTypeOfPropertyOfContextualType(type, name, nameType) {
73544
73572
  return mapType(type, function (t) {
73545
- if (t.flags & 2097152 /* Intersection */) {
73546
- var intersection = t;
73547
- var newTypes = ts.mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
73548
- if (newTypes.length > 0) {
73549
- return getIntersectionType(newTypes);
73550
- }
73551
- newTypes = ts.mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
73552
- if (newTypes.length > 0) {
73553
- return getIntersectionType(newTypes);
73554
- }
73555
- return undefined;
73556
- }
73557
- var concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
73558
- if (concretePropertyType) {
73559
- return concretePropertyType;
73560
- }
73561
- return getTypeOfApplicableIndexInfoOfContextualType(t);
73562
- }, /*noReductions*/ true);
73563
- function getTypeOfConcretePropertyOfContextualType(t) {
73573
+ var _a;
73564
73574
  if (isGenericMappedType(t) && !t.declaration.nameType) {
73565
73575
  var constraint = getConstraintTypeFromMappedType(t);
73566
73576
  var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
@@ -73568,9 +73578,8 @@ var ts;
73568
73578
  if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
73569
73579
  return substituteIndexedMappedType(t, propertyNameType);
73570
73580
  }
73571
- return undefined;
73572
73581
  }
73573
- if (t.flags & 3670016 /* StructuredType */) {
73582
+ else if (t.flags & 3670016 /* StructuredType */) {
73574
73583
  var prop = getPropertyOfType(t, name);
73575
73584
  if (prop) {
73576
73585
  return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
@@ -73581,16 +73590,10 @@ var ts;
73581
73590
  return restType;
73582
73591
  }
73583
73592
  }
73593
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73584
73594
  }
73585
73595
  return undefined;
73586
- }
73587
- function getTypeOfApplicableIndexInfoOfContextualType(t) {
73588
- var _a;
73589
- if (!(t.flags & 3670016 /* StructuredType */)) {
73590
- return undefined;
73591
- }
73592
- return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73593
- }
73596
+ }, /*noReductions*/ true);
73594
73597
  }
73595
73598
  // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of
73596
73599
  // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one
@@ -73972,17 +73975,15 @@ var ts;
73972
73975
  var typeParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(intrinsicClassAttribs.symbol);
73973
73976
  var hostClassType = getReturnTypeOfSignature(sig);
73974
73977
  var libraryManagedAttributeType = void 0;
73975
- if (typeParams && typeParams.length === 1) {
73978
+ if (typeParams) {
73979
+ // apply JSX.IntrinsicClassElements<hostClassType, ...>
73976
73980
  var inferredArgs = fillMissingTypeArguments([hostClassType], typeParams, getMinTypeArgumentCount(typeParams), ts.isInJSFile(context));
73977
73981
  libraryManagedAttributeType = instantiateType(intrinsicClassAttribs, createTypeMapper(typeParams, inferredArgs));
73978
73982
  }
73979
- else if (typeParams)
73980
- libraryManagedAttributeType = undefined;
73983
+ // or JSX.IntrinsicClassElements has no generics.
73981
73984
  else
73982
73985
  libraryManagedAttributeType = intrinsicClassAttribs;
73983
- if (libraryManagedAttributeType) {
73984
- apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType);
73985
- }
73986
+ apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType);
73986
73987
  }
73987
73988
  var intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes, context);
73988
73989
  if (!isErrorType(intrinsicAttribs)) {
@@ -126064,6 +126065,7 @@ var ts;
126064
126065
  if (value) {
126065
126066
  return isParsedCommandLine(value) ? value : undefined;
126066
126067
  }
126068
+ ts.performance.mark("SolutionBuilder::beforeConfigFileParsing");
126067
126069
  var diagnostic;
126068
126070
  var parseConfigFileHost = state.parseConfigFileHost, baseCompilerOptions = state.baseCompilerOptions, baseWatchOptions = state.baseWatchOptions, extendedConfigCache = state.extendedConfigCache, host = state.host;
126069
126071
  var parsed;
@@ -126078,6 +126080,8 @@ var ts;
126078
126080
  parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = ts.noop;
126079
126081
  }
126080
126082
  configFileCache.set(configFilePath, parsed || diagnostic);
126083
+ ts.performance.mark("SolutionBuilder::afterConfigFileParsing");
126084
+ ts.performance.measure("SolutionBuilder::Config file parsing", "SolutionBuilder::beforeConfigFileParsing", "SolutionBuilder::afterConfigFileParsing");
126081
126085
  return parsed;
126082
126086
  }
126083
126087
  function resolveProjectName(state, name) {
@@ -126277,6 +126281,7 @@ var ts;
126277
126281
  if (updateOutputFileStampsPending) {
126278
126282
  updateOutputTimestamps(state, config, projectPath);
126279
126283
  }
126284
+ ts.performance.mark("SolutionBuilder::Timestamps only updates");
126280
126285
  return doneInvalidatedProject(state, projectPath);
126281
126286
  }
126282
126287
  };
@@ -126370,6 +126375,10 @@ var ts;
126370
126375
  };
126371
126376
  function done(cancellationToken, writeFile, customTransformers) {
126372
126377
  executeSteps(BuildStep.Done, cancellationToken, writeFile, customTransformers);
126378
+ if (kind === InvalidatedProjectKind.Build)
126379
+ ts.performance.mark("SolutionBuilder::Projects built");
126380
+ else
126381
+ ts.performance.mark("SolutionBuilder::Bundles updated");
126373
126382
  return doneInvalidatedProject(state, projectPath);
126374
126383
  }
126375
126384
  function withProgramOrUndefined(action) {
@@ -127142,7 +127151,10 @@ var ts;
127142
127151
  if (prior !== undefined) {
127143
127152
  return prior;
127144
127153
  }
127154
+ ts.performance.mark("SolutionBuilder::beforeUpToDateCheck");
127145
127155
  var actual = getUpToDateStatusWorker(state, project, resolvedPath);
127156
+ ts.performance.mark("SolutionBuilder::afterUpToDateCheck");
127157
+ ts.performance.measure("SolutionBuilder::Up-to-date check", "SolutionBuilder::beforeUpToDateCheck", "SolutionBuilder::afterUpToDateCheck");
127146
127158
  state.projectStatus.set(resolvedPath, actual);
127147
127159
  return actual;
127148
127160
  }
@@ -127280,6 +127292,13 @@ var ts;
127280
127292
  }
127281
127293
  }
127282
127294
  function build(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences) {
127295
+ ts.performance.mark("SolutionBuilder::beforeBuild");
127296
+ var result = buildWorker(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences);
127297
+ ts.performance.mark("SolutionBuilder::afterBuild");
127298
+ ts.performance.measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
127299
+ return result;
127300
+ }
127301
+ function buildWorker(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences) {
127283
127302
  var buildOrder = getBuildOrderFor(state, project, onlyReferences);
127284
127303
  if (!buildOrder)
127285
127304
  return ts.ExitStatus.InvalidProject_OutputsSkipped;
@@ -127307,6 +127326,13 @@ var ts;
127307
127326
  : ts.ExitStatus.DiagnosticsPresent_OutputsSkipped;
127308
127327
  }
127309
127328
  function clean(state, project, onlyReferences) {
127329
+ ts.performance.mark("SolutionBuilder::beforeClean");
127330
+ var result = cleanWorker(state, project, onlyReferences);
127331
+ ts.performance.mark("SolutionBuilder::afterClean");
127332
+ ts.performance.measure("SolutionBuilder::Clean", "SolutionBuilder::beforeClean", "SolutionBuilder::afterClean");
127333
+ return result;
127334
+ }
127335
+ function cleanWorker(state, project, onlyReferences) {
127310
127336
  var buildOrder = getBuildOrderFor(state, project, onlyReferences);
127311
127337
  if (!buildOrder)
127312
127338
  return ts.ExitStatus.InvalidProject_OutputsSkipped;
@@ -127380,6 +127406,14 @@ var ts;
127380
127406
  state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
127381
127407
  }
127382
127408
  function buildNextInvalidatedProject(state, changeDetected) {
127409
+ ts.performance.mark("SolutionBuilder::beforeBuild");
127410
+ var buildOrder = buildNextInvalidatedProjectWorker(state, changeDetected);
127411
+ ts.performance.mark("SolutionBuilder::afterBuild");
127412
+ ts.performance.measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
127413
+ if (buildOrder)
127414
+ reportErrorSummary(state, buildOrder);
127415
+ }
127416
+ function buildNextInvalidatedProjectWorker(state, changeDetected) {
127383
127417
  state.timerToBuildInvalidatedProject = undefined;
127384
127418
  if (state.reportFileChangeDetected) {
127385
127419
  state.reportFileChangeDetected = false;
@@ -127412,7 +127446,7 @@ var ts;
127412
127446
  }
127413
127447
  }
127414
127448
  disableCache(state);
127415
- reportErrorSummary(state, buildOrder);
127449
+ return buildOrder;
127416
127450
  }
127417
127451
  function watchConfigFile(state, resolved, resolvedPath, parsed) {
127418
127452
  if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
@@ -127467,6 +127501,7 @@ var ts;
127467
127501
  function startWatching(state, buildOrder) {
127468
127502
  if (!state.watchAllProjectsPending)
127469
127503
  return;
127504
+ ts.performance.mark("SolutionBuilder::beforeWatcherCreation");
127470
127505
  state.watchAllProjectsPending = false;
127471
127506
  for (var _i = 0, _a = getBuildOrderFromAnyBuildOrder(buildOrder); _i < _a.length; _i++) {
127472
127507
  var resolved = _a[_i];
@@ -127484,6 +127519,8 @@ var ts;
127484
127519
  watchPackageJsonFiles(state, resolved, resolvedPath, cfg);
127485
127520
  }
127486
127521
  }
127522
+ ts.performance.mark("SolutionBuilder::afterWatcherCreation");
127523
+ ts.performance.measure("SolutionBuilder::Watcher creation", "SolutionBuilder::beforeWatcherCreation", "SolutionBuilder::afterWatcherCreation");
127487
127524
  }
127488
127525
  function stopWatching(state) {
127489
127526
  ts.clearMap(state.allWatchedConfigFiles, ts.closeFileWatcher);
@@ -108,7 +108,7 @@ var ts;
108
108
  // The following is baselined as a literal template type without intervention
109
109
  /** The version of the TypeScript compiler release */
110
110
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
111
- ts.version = ts.versionMajorMinor + ".0-dev.20220811";
111
+ ts.version = ts.versionMajorMinor + ".0-dev.20220814";
112
112
  /* @internal */
113
113
  var Comparison;
114
114
  (function (Comparison) {
@@ -3562,6 +3562,8 @@ var ts;
3562
3562
  typeof performance.mark === "function" &&
3563
3563
  typeof performance.measure === "function" &&
3564
3564
  typeof performance.now === "function" &&
3565
+ typeof performance.clearMarks === "function" &&
3566
+ typeof performance.clearMeasures === "function" &&
3565
3567
  typeof PerformanceObserver === "function";
3566
3568
  }
3567
3569
  function tryGetWebPerformanceHooks() {
@@ -3606,7 +3608,9 @@ var ts;
3606
3608
  if (end === "__performance.measure-fix__") {
3607
3609
  nodePerformance_1.clearMarks("__performance.measure-fix__");
3608
3610
  }
3609
- }
3611
+ },
3612
+ clearMarks: function (name) { return nodePerformance_1.clearMarks(name); },
3613
+ clearMeasures: function (name) { return nodePerformance_1.clearMeasures(name); },
3610
3614
  };
3611
3615
  }
3612
3616
  return {
@@ -3739,6 +3743,30 @@ var ts;
3739
3743
  durations.forEach(function (duration, measureName) { return cb(measureName, duration); });
3740
3744
  }
3741
3745
  performance.forEachMeasure = forEachMeasure;
3746
+ function forEachMark(cb) {
3747
+ marks.forEach(function (_time, markName) { return cb(markName); });
3748
+ }
3749
+ performance.forEachMark = forEachMark;
3750
+ function clearMeasures(name) {
3751
+ if (name !== undefined)
3752
+ durations.delete(name);
3753
+ else
3754
+ durations.clear();
3755
+ performanceImpl === null || performanceImpl === void 0 ? void 0 : performanceImpl.clearMeasures(name);
3756
+ }
3757
+ performance.clearMeasures = clearMeasures;
3758
+ function clearMarks(name) {
3759
+ if (name !== undefined) {
3760
+ counts.delete(name);
3761
+ marks.delete(name);
3762
+ }
3763
+ else {
3764
+ counts.clear();
3765
+ marks.clear();
3766
+ }
3767
+ performanceImpl === null || performanceImpl === void 0 ? void 0 : performanceImpl.clearMarks(name);
3768
+ }
3769
+ performance.clearMarks = clearMarks;
3742
3770
  /**
3743
3771
  * Indicates whether the performance API is enabled.
3744
3772
  */
@@ -73541,25 +73569,7 @@ var ts;
73541
73569
  }
73542
73570
  function getTypeOfPropertyOfContextualType(type, name, nameType) {
73543
73571
  return mapType(type, function (t) {
73544
- if (t.flags & 2097152 /* Intersection */) {
73545
- var intersection = t;
73546
- var newTypes = ts.mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
73547
- if (newTypes.length > 0) {
73548
- return getIntersectionType(newTypes);
73549
- }
73550
- newTypes = ts.mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
73551
- if (newTypes.length > 0) {
73552
- return getIntersectionType(newTypes);
73553
- }
73554
- return undefined;
73555
- }
73556
- var concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
73557
- if (concretePropertyType) {
73558
- return concretePropertyType;
73559
- }
73560
- return getTypeOfApplicableIndexInfoOfContextualType(t);
73561
- }, /*noReductions*/ true);
73562
- function getTypeOfConcretePropertyOfContextualType(t) {
73572
+ var _a;
73563
73573
  if (isGenericMappedType(t) && !t.declaration.nameType) {
73564
73574
  var constraint = getConstraintTypeFromMappedType(t);
73565
73575
  var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
@@ -73567,9 +73577,8 @@ var ts;
73567
73577
  if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
73568
73578
  return substituteIndexedMappedType(t, propertyNameType);
73569
73579
  }
73570
- return undefined;
73571
73580
  }
73572
- if (t.flags & 3670016 /* StructuredType */) {
73581
+ else if (t.flags & 3670016 /* StructuredType */) {
73573
73582
  var prop = getPropertyOfType(t, name);
73574
73583
  if (prop) {
73575
73584
  return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
@@ -73580,16 +73589,10 @@ var ts;
73580
73589
  return restType;
73581
73590
  }
73582
73591
  }
73592
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73583
73593
  }
73584
73594
  return undefined;
73585
- }
73586
- function getTypeOfApplicableIndexInfoOfContextualType(t) {
73587
- var _a;
73588
- if (!(t.flags & 3670016 /* StructuredType */)) {
73589
- return undefined;
73590
- }
73591
- return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73592
- }
73595
+ }, /*noReductions*/ true);
73593
73596
  }
73594
73597
  // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of
73595
73598
  // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one
@@ -73971,17 +73974,15 @@ var ts;
73971
73974
  var typeParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(intrinsicClassAttribs.symbol);
73972
73975
  var hostClassType = getReturnTypeOfSignature(sig);
73973
73976
  var libraryManagedAttributeType = void 0;
73974
- if (typeParams && typeParams.length === 1) {
73977
+ if (typeParams) {
73978
+ // apply JSX.IntrinsicClassElements<hostClassType, ...>
73975
73979
  var inferredArgs = fillMissingTypeArguments([hostClassType], typeParams, getMinTypeArgumentCount(typeParams), ts.isInJSFile(context));
73976
73980
  libraryManagedAttributeType = instantiateType(intrinsicClassAttribs, createTypeMapper(typeParams, inferredArgs));
73977
73981
  }
73978
- else if (typeParams)
73979
- libraryManagedAttributeType = undefined;
73982
+ // or JSX.IntrinsicClassElements has no generics.
73980
73983
  else
73981
73984
  libraryManagedAttributeType = intrinsicClassAttribs;
73982
- if (libraryManagedAttributeType) {
73983
- apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType);
73984
- }
73985
+ apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType);
73985
73986
  }
73986
73987
  var intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes, context);
73987
73988
  if (!isErrorType(intrinsicAttribs)) {
@@ -126063,6 +126064,7 @@ var ts;
126063
126064
  if (value) {
126064
126065
  return isParsedCommandLine(value) ? value : undefined;
126065
126066
  }
126067
+ ts.performance.mark("SolutionBuilder::beforeConfigFileParsing");
126066
126068
  var diagnostic;
126067
126069
  var parseConfigFileHost = state.parseConfigFileHost, baseCompilerOptions = state.baseCompilerOptions, baseWatchOptions = state.baseWatchOptions, extendedConfigCache = state.extendedConfigCache, host = state.host;
126068
126070
  var parsed;
@@ -126077,6 +126079,8 @@ var ts;
126077
126079
  parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = ts.noop;
126078
126080
  }
126079
126081
  configFileCache.set(configFilePath, parsed || diagnostic);
126082
+ ts.performance.mark("SolutionBuilder::afterConfigFileParsing");
126083
+ ts.performance.measure("SolutionBuilder::Config file parsing", "SolutionBuilder::beforeConfigFileParsing", "SolutionBuilder::afterConfigFileParsing");
126080
126084
  return parsed;
126081
126085
  }
126082
126086
  function resolveProjectName(state, name) {
@@ -126276,6 +126280,7 @@ var ts;
126276
126280
  if (updateOutputFileStampsPending) {
126277
126281
  updateOutputTimestamps(state, config, projectPath);
126278
126282
  }
126283
+ ts.performance.mark("SolutionBuilder::Timestamps only updates");
126279
126284
  return doneInvalidatedProject(state, projectPath);
126280
126285
  }
126281
126286
  };
@@ -126369,6 +126374,10 @@ var ts;
126369
126374
  };
126370
126375
  function done(cancellationToken, writeFile, customTransformers) {
126371
126376
  executeSteps(BuildStep.Done, cancellationToken, writeFile, customTransformers);
126377
+ if (kind === InvalidatedProjectKind.Build)
126378
+ ts.performance.mark("SolutionBuilder::Projects built");
126379
+ else
126380
+ ts.performance.mark("SolutionBuilder::Bundles updated");
126372
126381
  return doneInvalidatedProject(state, projectPath);
126373
126382
  }
126374
126383
  function withProgramOrUndefined(action) {
@@ -127141,7 +127150,10 @@ var ts;
127141
127150
  if (prior !== undefined) {
127142
127151
  return prior;
127143
127152
  }
127153
+ ts.performance.mark("SolutionBuilder::beforeUpToDateCheck");
127144
127154
  var actual = getUpToDateStatusWorker(state, project, resolvedPath);
127155
+ ts.performance.mark("SolutionBuilder::afterUpToDateCheck");
127156
+ ts.performance.measure("SolutionBuilder::Up-to-date check", "SolutionBuilder::beforeUpToDateCheck", "SolutionBuilder::afterUpToDateCheck");
127145
127157
  state.projectStatus.set(resolvedPath, actual);
127146
127158
  return actual;
127147
127159
  }
@@ -127279,6 +127291,13 @@ var ts;
127279
127291
  }
127280
127292
  }
127281
127293
  function build(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences) {
127294
+ ts.performance.mark("SolutionBuilder::beforeBuild");
127295
+ var result = buildWorker(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences);
127296
+ ts.performance.mark("SolutionBuilder::afterBuild");
127297
+ ts.performance.measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
127298
+ return result;
127299
+ }
127300
+ function buildWorker(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences) {
127282
127301
  var buildOrder = getBuildOrderFor(state, project, onlyReferences);
127283
127302
  if (!buildOrder)
127284
127303
  return ts.ExitStatus.InvalidProject_OutputsSkipped;
@@ -127306,6 +127325,13 @@ var ts;
127306
127325
  : ts.ExitStatus.DiagnosticsPresent_OutputsSkipped;
127307
127326
  }
127308
127327
  function clean(state, project, onlyReferences) {
127328
+ ts.performance.mark("SolutionBuilder::beforeClean");
127329
+ var result = cleanWorker(state, project, onlyReferences);
127330
+ ts.performance.mark("SolutionBuilder::afterClean");
127331
+ ts.performance.measure("SolutionBuilder::Clean", "SolutionBuilder::beforeClean", "SolutionBuilder::afterClean");
127332
+ return result;
127333
+ }
127334
+ function cleanWorker(state, project, onlyReferences) {
127309
127335
  var buildOrder = getBuildOrderFor(state, project, onlyReferences);
127310
127336
  if (!buildOrder)
127311
127337
  return ts.ExitStatus.InvalidProject_OutputsSkipped;
@@ -127379,6 +127405,14 @@ var ts;
127379
127405
  state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
127380
127406
  }
127381
127407
  function buildNextInvalidatedProject(state, changeDetected) {
127408
+ ts.performance.mark("SolutionBuilder::beforeBuild");
127409
+ var buildOrder = buildNextInvalidatedProjectWorker(state, changeDetected);
127410
+ ts.performance.mark("SolutionBuilder::afterBuild");
127411
+ ts.performance.measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
127412
+ if (buildOrder)
127413
+ reportErrorSummary(state, buildOrder);
127414
+ }
127415
+ function buildNextInvalidatedProjectWorker(state, changeDetected) {
127382
127416
  state.timerToBuildInvalidatedProject = undefined;
127383
127417
  if (state.reportFileChangeDetected) {
127384
127418
  state.reportFileChangeDetected = false;
@@ -127411,7 +127445,7 @@ var ts;
127411
127445
  }
127412
127446
  }
127413
127447
  disableCache(state);
127414
- reportErrorSummary(state, buildOrder);
127448
+ return buildOrder;
127415
127449
  }
127416
127450
  function watchConfigFile(state, resolved, resolvedPath, parsed) {
127417
127451
  if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
@@ -127466,6 +127500,7 @@ var ts;
127466
127500
  function startWatching(state, buildOrder) {
127467
127501
  if (!state.watchAllProjectsPending)
127468
127502
  return;
127503
+ ts.performance.mark("SolutionBuilder::beforeWatcherCreation");
127469
127504
  state.watchAllProjectsPending = false;
127470
127505
  for (var _i = 0, _a = getBuildOrderFromAnyBuildOrder(buildOrder); _i < _a.length; _i++) {
127471
127506
  var resolved = _a[_i];
@@ -127483,6 +127518,8 @@ var ts;
127483
127518
  watchPackageJsonFiles(state, resolved, resolvedPath, cfg);
127484
127519
  }
127485
127520
  }
127521
+ ts.performance.mark("SolutionBuilder::afterWatcherCreation");
127522
+ ts.performance.measure("SolutionBuilder::Watcher creation", "SolutionBuilder::beforeWatcherCreation", "SolutionBuilder::afterWatcherCreation");
127486
127523
  }
127487
127524
  function stopWatching(state) {
127488
127525
  ts.clearMap(state.allWatchedConfigFiles, ts.closeFileWatcher);