# TS1119: An object literal cannot have property and accessor with the same name.

> An object literal has both a plain property and a getter or setter with the same name. Use one form.

## What it means

A name in an object literal is either a data property (`a: 1`) or an accessor
(`get a() {}` / `set a(v) {}`), not both.

## Example

```ts
const o = {
  a: 1,
  get a() { return 2; },
};
export {};
```

## How to fix

- Keep either the property or the accessor.
- If the accessor needs a backing value, store it under another name: `_a: 1, get a() { return this._a; }`.

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