exactOptionalPropertyTypes

The compiler option that forbids setting an optional property to undefined explicitly, so it must be omitted or given a real value.

In more detail

It lets the types tell apart a key that is missing from one that is present but undefined, which matters when a missing key means leave unchanged. It is not part of strict and must be enabled separately.

Related terms

Taught in

References