The overload signatures of a function or method are not next to each other
What it finds
Overloads describe one function. Spread over a class or module with other members in between, readers miss some of the signatures, and TypeScript requires the implementation to follow the signatures directly.
Reported are overload signatures and implementations of the same name that are separated by other declarations, in classes, interfaces and modules.
From the rule's source, scattered_overloads.rs.
export interface Parser { parse(text: string): number; reset(): void; parse(text: string, radix: number): number;tx0 reports: this overload of parse is separated from the others} Turn it on, off or suppress it
The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/ts:scattered-overloads" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/ts:scattered-overloads] reason="..."tx0 explain tx0/ts:scattered-overloads shows the same in the terminal. Found a false positive? Report it.