Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d562244

Browse files
authored
docs(eslint-plugin): remove invalid examples for unified-signatures (typescript-eslint#6286)
Update unified-signatures.md
1 parent 503bfde commit d562244

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

packages/eslint-plugin/docs/rules/unified-signatures.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ function x(x: number | string): void;
3838
function y(...x: number[]): void;
3939
```
4040

41+
```ts
42+
// This rule won't check overload signatures with different rest parameter types.
43+
// See https://github.com/microsoft/TypeScript/issues/5077
44+
function f(...a: number[]): void;
45+
function f(...a: string[]): void;
46+
```
47+
4148
## Options
4249

4350
### `ignoreDifferentlyNamedParameters`
@@ -53,21 +60,11 @@ function f(a: number): void;
5360
function f(a: string): void;
5461
```
5562

56-
```ts
57-
function f(...a: number[]): void;
58-
function f(...b: string[]): void;
59-
```
60-
6163
### ✅ Correct
6264

6365
```ts
6466
function f(a: number): void;
6567
function f(b: string): void;
6668
```
6769

68-
```ts
69-
function f(...a: number[]): void;
70-
function f(...a: string[]): void;
71-
```
72-
7370
## Options

0 commit comments

Comments
 (0)