# TS1206: Decorators are not valid here.

> A decorator is placed on something that cannot be decorated, such as a function declaration or a variable statement.

## What it means

Decorators apply to classes and class members (and, with `experimentalDecorators`,
parameters of class methods and constructors). On other declarations, such as plain functions,
variable statements or constructors, they're reported here.

## Example

```ts
function log(target: unknown) {}
@log
function run() {}
export {};
```

## How to fix

- Call the function yourself instead: `const run = log(function run() {})`, or wrap it in a class.
- Move the decorator to a class or class member.

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