Skip to content

Commit

Permalink
fix: use-adjacent-overload-signature diagnostic (#3095)
Browse files Browse the repository at this point in the history
  • Loading branch information
chansuke authored Jun 6, 2024
1 parent 7c83e79 commit 660fbe8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ class C {
}

class D {
fooB(s: string): void;
fooB(s: string): void;
barB(): void {};
fooB(n: number): void;
fooB(sn: string | number): void {};
fooB(sn: string | number): void {};
fooD(s: string): void;
fooD(s: string): void;
barD(): void {};
fooD(n: number): void;
fooD(sn: string | number): void {};
fooD(sn: string | number): void {};
}

export function foo(s: string): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ class C {
}

class D {
fooB(s: string): void;
fooB(s: string): void;
barB(): void {};
fooB(n: number): void;
fooB(sn: string | number): void {};
fooB(sn: string | number): void {};
fooD(s: string): void;
fooD(s: string): void;
barD(): void {};
fooD(n: number): void;
fooD(sn: string | number): void {};
fooD(sn: string | number): void {};
}

export function foo(s: string): void;
Expand Down Expand Up @@ -200,14 +200,14 @@ invalid.ts:40:3 lint/nursery/useAdjacentOverloadSignatures ━━━━━━━
```
invalid.ts:50:3 lint/nursery/useAdjacentOverloadSignatures ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! All fooB signatures must be adjacent.
! All fooD signatures must be adjacent.
48 │ fooB(s: string): void;
49 │ barB(): void {};
> 50 │ fooB(n: number): void;
48 │ fooD(s: string): void;
49 │ barD(): void {};
> 50 │ fooD(n: number): void;
│ ^^^^
51 │ fooB(sn: string | number): void {};
52 │ fooB(sn: string | number): void {};
51 │ fooD(sn: string | number): void {};
52 │ fooD(sn: string | number): void {};
```
Expand Down

0 comments on commit 660fbe8

Please sign in to comment.