# TS17006: An unary expression with the '…' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.

> A unary operator like `-x` is on the left of `**`. Add parentheses: `(-x) ** 2`.

## What it means

JavaScript doesn't allow a unary operator (`-`, `+`, `!`, `~`, `typeof`, `void`, `delete`,
`await`) directly on the left-hand side of `**`, because `-2 ** 2` would be ambiguous. ts-r's
parser reports it; the message names the operator.

## Example

```ts
declare const x: number;
export const y = -x ** 2;
```

## How to fix

- Add parentheses for the meaning you want: `(-x) ** 2` or `-(x ** 2)`.

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