Closed
Description
Repro
{
"rules": {
"@typescript-eslint/unified-signatures": "error"
}
}
declare const findUp: {
(name: string | readonly string[], options?: findUp.Options): Promise<string | undefined>;
(matcher: (directory: string) => (findUp.Match | Promise<findUp.Match>), options?: findUp.Options): Promise<string | undefined>;
};
Expected Result
I expected it not to be a violation as a different parameter name is a good indication that the overloads are not compatible.
Actual Result
β 57:4 These overloads can be combined into one signature taking string | string[] | (directory: string) => findUp.Match. @typescript-eslint/unified-signatures
β 134:3 These overloads can be combined into one signature taking string | string[] | (directory: string) => (findUp.Match | Promise<findUp.Match>). @typescript-eslint/unified-signatures
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
3.9.0 |
@typescript-eslint/parser |
3.9.0 |
TypeScript |
3.9.7 |
ESLint |
7.6.0 |
node |
10.22.0 |
npm |
6.14.7 |