This makes it so that for fallback types (e.g. boolean and number), if it’s the last fallback type among overloads or in a union, then the conversion will no longer be duplicated in the if‑and‑else branches:
-} else if (typeof curArg === \\"boolean\\") {
- {
- let curArg = arguments[0];
- curArg = conversions[\\"boolean\\"](curArg, {
- context: \\"Failed to execute 'overloadsObjectOrBoolean' on 'NoUselessIfElse': parameter 1\\"
- });
- args.push(curArg);
- }
} else {
{
let curArg = arguments[0];
curArg = conversions[\\"boolean\\"](curArg, {
context: \\"Failed to execute 'overloadsObjectOrBoolean' on 'NoUselessIfElse': parameter 1\\"
});
args.push(curArg);
}
}
This makes it so that for fallback types (e.g.
boolean
andnumber
), if it’s the last fallback type among overloads or in a union, then the conversion will no longer be duplicated in theif
‑and‑else
branches:Depends on: