# TS2578: Unused '@ts-expect-error' directive.

> A // @ts-expect-error comment has no error on the next line to suppress. Remove the comment.

## What it means

`// @ts-expect-error` suppresses the error on the following line, and it is itself an error when
that line has no error. That keeps the directive from outliving the problem it was added for.

## Example

```ts
// @ts-expect-error
const n: number = 1;
export {};
```

## How to fix

- Delete the directive if the error it covered has been fixed.
- If you only want to silence a possible error, `// @ts-ignore` doesn't complain when there is none, but it hides real errors too.

Source: https://ts-r.dev/errors/TS2578/
