const obj = {
  a: string,
  b: number,
};
 
const nullableObj = {
  a: string | null,
  b: number | null,
};

**Ответ

type Nullable<T> = {
  [P in keyof T]: T[P] | null;
};

Назад