# TS1011: An element access expression should take an argument.

> An element access (`x[...]`) has nothing inside the brackets. Put the index or key between the brackets.

## What it means

Square brackets after an expression read an element or property, so they need an expression
inside: an index, a key, or a variable holding one. Empty brackets `[]` after a value are only
valid in types (`string[]`), not in expressions.

## Example

```ts
const items = [1, 2, 3];
const first = items[];
export {};
```

## How to fix

- Write the index or key: `items[0]`.
- If you meant an array type, move it to a type position: `const items: number[] = []`.

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