# TS18048: '…' is possibly 'undefined'.

> A value that may be `undefined` is used without a check, such as an optional property or parameter. Handle `undefined` first.

## What it means

With `strictNullChecks`, a value whose type includes `undefined` (an optional property or
parameter, a `find` result, an indexed read under `noUncheckedIndexedAccess`) can't be
dereferenced directly.

## Example

```ts
interface User {
  address?: { city: string };
}
export function city(u: User) {
  return u.address.city;
}
```

## How to fix

- Check it: `if (!u.address) return "";`.
- Use optional chaining and a default: `u.address?.city ?? ""`.
- If it's always present, make the property required in the type.

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