Added optimization to shortcut overlapping overload checks if the diagnostic is suppressed.

This commit is contained in:
Eric Traut 2024-08-07 12:10:32 -06:00
parent 51c98aa945
commit 3d52679f59

View File

@ -3211,6 +3211,10 @@ export class Checker extends ParseTreeWalker {
return;
}
if (this._fileInfo.diagnosticRuleSet.reportInconsistentOverload === 'none') {
return;
}
// Verify that all overload signatures are assignable to implementation signature.
OverloadedFunctionType.getOverloads(type).forEach((overload, index) => {
const diag = new DiagnosticAddendum();