> For AI agents: the complete documentation index is available at https://rslint.rs/llms.txt, the full documentation bundle is available at https://rslint.rs/llms-full.txt.

# unified-signatures

[Added in v0.1.14](https://github.com/web-infra-dev/rslint/releases/tag/v0.1.14)
## Configuration

| Preset                         | Configured Value |
| ------------------------------ | ---------------- |
| ✅ ts.configs.strict            | `"error"`        |
| ✅ ts.configs.strictTypeChecked | `"error"`        |


```ts title=rslint.config.ts
import { defineConfig, ts } from '@rslint/core';

export default defineConfig([
  ts.configs.recommended,
  {
    rules: {
      '@typescript-eslint/unified-signatures': 'error',
    },
  },
]);
```

Disallow overloads that can be combined into one signature with a union,
optional parameter, or rest parameter.

## Rule details

Multiple overloads make an API harder to read when they differ only in a
single parameter type or in one parameter that can be omitted. This rule
reports those signatures and recommends expressing the difference directly.

Examples of **incorrect** code for this rule:

```typescript
function parse(value: string): void;
function parse(value: number): void;

interface Factory {
  create(): Result;
  create(options?: Options): Result;
}
```

Examples of **correct** code for this rule:

```typescript
function parse(value: string | number): void;

interface Factory {
  create(options?: Options): Result;
}

function convert(value: string): string;
function convert(value: number): number;
```

The last pair is allowed because its return types differ.

## Options

The rule accepts an optional object:

```json
{
  "ignoreDifferentlyNamedParameters": false,
  "ignoreOverloadsWithDifferentJSDoc": false
}
```

### `ignoreDifferentlyNamedParameters`

When `true`, overloads whose corresponding parameters have different names
are not combined.

### `ignoreOverloadsWithDifferentJSDoc`

When `true`, overloads with different preceding block comments are not
combined.

## Original documentation

- [typescript-eslint: unified-signatures](https://typescript-eslint.io/rules/unified-signatures)
- [Source code](https://github.com/typescript-eslint/typescript-eslint/blob/v8.69.0/packages/eslint-plugin/src/rules/unified-signatures.ts)
- [Tests](https://github.com/typescript-eslint/typescript-eslint/blob/v8.69.0/packages/eslint-plugin/tests/rules/unified-signatures.test.ts)
