# TS7028: Unused label.

> A statement label is declared but no `break` or `continue` uses it. Remove the label.

## What it means

A label such as `outer:` is only useful as the target of `break outer` or `continue outer`.
This is reported when `allowUnusedLabels` is `false`; it often catches an object literal
written where a block was parsed (`{ a: 1 }` as a statement makes `a` a label).

## Example

```json
{ "compilerOptions": { "allowUnusedLabels": false } }
```

```ts
export function f(xs: number[]) {
  outer: for (const x of xs) {
    console.log(x);
  }
}
```

## How to fix

- Remove the label.
- If you meant an object literal, wrap it in parentheses or assign it to something.

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