@@ -2428,10 +2428,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
24282428 return visitEachChild(node, markAsSynthetic, /*context*/ undefined);
24292429 }
24302430
2431- function getEmitResolver(sourceFile: SourceFile, cancellationToken: CancellationToken, skipCheck?: boolean ) {
2431+ function getEmitResolver(sourceFile: SourceFile, cancellationToken: CancellationToken) {
24322432 // Ensure we have all the type information in place for this file so that all the
24332433 // emitter questions of this resolver will return the right information.
2434- getDiagnostics(sourceFile, cancellationToken, skipCheck );
2434+ getDiagnostics(sourceFile, cancellationToken);
24352435 return emitResolver;
24362436 }
24372437
@@ -47483,10 +47483,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4748347483 tracing?.pop();
4748447484 }
4748547485
47486- function checkSourceFile(node: SourceFile, skipCheck: boolean | undefined ) {
47486+ function checkSourceFile(node: SourceFile) {
4748747487 tracing?.push(tracing.Phase.Check, "checkSourceFile", { path: node.path }, /*separateBeginAndEnd*/ true);
4748847488 performance.mark("beforeCheck");
47489- checkSourceFileWorker(node, skipCheck );
47489+ checkSourceFileWorker(node);
4749047490 performance.mark("afterCheck");
4749147491 performance.measure("Check", "beforeCheck", "afterCheck");
4749247492 tracing?.pop();
@@ -47511,10 +47511,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4751147511 }
4751247512
4751347513 // Fully type check a source file and collect the relevant diagnostics.
47514- function checkSourceFileWorker(node: SourceFile, skipCheck: boolean | undefined ) {
47514+ function checkSourceFileWorker(node: SourceFile) {
4751547515 const links = getNodeLinks(node);
4751647516 if (!(links.flags & NodeCheckFlags.TypeChecked)) {
47517- if (skipCheck || skipTypeChecking(node, compilerOptions, host)) {
47517+ if (skipTypeChecking(node, compilerOptions, host)) {
4751847518 return;
4751947519 }
4752047520
@@ -47578,13 +47578,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4757847578 }
4757947579 }
4758047580
47581- function getDiagnostics(sourceFile: SourceFile, ct: CancellationToken, skipCheck?: boolean ): Diagnostic[] {
47581+ function getDiagnostics(sourceFile: SourceFile, ct: CancellationToken): Diagnostic[] {
4758247582 try {
4758347583 // Record the cancellation token so it can be checked later on during checkSourceElement.
4758447584 // Do this in a finally block so we can ensure that it gets reset back to nothing after
4758547585 // this call is done.
4758647586 cancellationToken = ct;
47587- return getDiagnosticsWorker(sourceFile, skipCheck );
47587+ return getDiagnosticsWorker(sourceFile);
4758847588 }
4758947589 finally {
4759047590 cancellationToken = undefined;
@@ -47599,7 +47599,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4759947599 deferredDiagnosticsCallbacks = [];
4760047600 }
4760147601
47602- function checkSourceFileWithEagerDiagnostics(sourceFile: SourceFile, skipCheck?: boolean ) {
47602+ function checkSourceFileWithEagerDiagnostics(sourceFile: SourceFile) {
4760347603 ensurePendingDiagnosticWorkComplete();
4760447604 // then setup diagnostics for immediate invocation (as we are about to collect them, and
4760547605 // this avoids the overhead of longer-lived callbacks we don't need to allocate)
@@ -47608,11 +47608,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4760847608 // thus much more likely retaining the same union ordering as before we had lazy diagnostics)
4760947609 const oldAddLazyDiagnostics = addLazyDiagnostic;
4761047610 addLazyDiagnostic = cb => cb();
47611- checkSourceFile(sourceFile, skipCheck );
47611+ checkSourceFile(sourceFile);
4761247612 addLazyDiagnostic = oldAddLazyDiagnostics;
4761347613 }
4761447614
47615- function getDiagnosticsWorker(sourceFile: SourceFile, skipCheck: boolean | undefined ): Diagnostic[] {
47615+ function getDiagnosticsWorker(sourceFile: SourceFile): Diagnostic[] {
4761647616 if (sourceFile) {
4761747617 ensurePendingDiagnosticWorkComplete();
4761847618 // Some global diagnostics are deferred until they are needed and
@@ -47621,7 +47621,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4762147621 const previousGlobalDiagnostics = diagnostics.getGlobalDiagnostics();
4762247622 const previousGlobalDiagnosticsSize = previousGlobalDiagnostics.length;
4762347623
47624- checkSourceFileWithEagerDiagnostics(sourceFile, skipCheck );
47624+ checkSourceFileWithEagerDiagnostics(sourceFile);
4762547625
4762647626 const semanticDiagnostics = diagnostics.getDiagnostics(sourceFile.fileName);
4762747627 const currentGlobalDiagnostics = diagnostics.getGlobalDiagnostics();
@@ -47642,7 +47642,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4764247642
4764347643 // Global diagnostics are always added when a file is not provided to
4764447644 // getDiagnostics
47645- forEach(host.getSourceFiles(), sourceFile => checkSourceFileWithEagerDiagnostics(sourceFile, skipCheck) );
47645+ forEach(host.getSourceFiles(), checkSourceFileWithEagerDiagnostics);
4764647646 return diagnostics.getDiagnostics();
4764747647 }
4764847648
0 commit comments