---
url: /docs/guide/usage/linter/rules/typescript/no-empty-interface.md
---

### What it does

Disallow the declaration of empty interfaces.

### Why is this bad?

An empty interface in TypeScript does very little: any non-nullable value is assignable to {}.
Using an empty interface is often a sign of programmer error, such as misunderstanding the concept of {} or forgetting to fill in fields.
This rule aims to ensure that only meaningful interfaces are declared in the code.

### Examples

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

```ts
interface Foo {}
interface Bar extends Foo {}
```

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

```ts
interface Foo {
  member: string;
}
interface Bar extends Foo {
  member: string;
}
```

## Configuration

This rule accepts a configuration object with the following properties:

### allowSingleExtends

type: `boolean`

default: `false`

When set to `true`, allows empty interfaces that extend a single interface.

## How to use

## Version

This rule was added in v0.0.6.

## References
