Skip to content

Commit

Permalink
docs(eslint-plugin): remove invalid examples for unified-signatures (#…
Browse files Browse the repository at this point in the history
…6286)

Update unified-signatures.md
  • Loading branch information
SuperSodaSea committed Jan 22, 2023
1 parent 503bfde commit d562244
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions packages/eslint-plugin/docs/rules/unified-signatures.md
Expand Up @@ -38,6 +38,13 @@ function x(x: number | string): void;
function y(...x: number[]): void;
```

```ts
// This rule won't check overload signatures with different rest parameter types.
// See https://github.com/microsoft/TypeScript/issues/5077
function f(...a: number[]): void;
function f(...a: string[]): void;
```

## Options

### `ignoreDifferentlyNamedParameters`
Expand All @@ -53,21 +60,11 @@ function f(a: number): void;
function f(a: string): void;
```

```ts
function f(...a: number[]): void;
function f(...b: string[]): void;
```

### ✅ Correct

```ts
function f(a: number): void;
function f(b: string): void;
```

```ts
function f(...a: number[]): void;
function f(...a: string[]): void;
```

## Options

0 comments on commit d562244

Please sign in to comment.