# TS2790: The operand of a 'delete' operator must be optional.

> delete is used on a required property under strictNullChecks. Make the property optional, or set it to a valid value instead.

## What it means

Deleting a property leaves it `undefined`. If the property's type says it's always present,
deleting it would break that promise, so only optional properties (or ones that accept
`undefined`) may be deleted.

## Example

```ts
interface User { name: string }
function clear(u: User) {
  delete u.name;
}
export {};
```

## How to fix

- Mark the property optional in the type: `name?: string`.
- Or assign a valid value instead of deleting it.

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