type-challenges / type-challenges

Collection of TypeScript type challenges with online judge

Home Page:https://tsch.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

17973 - DeepMutable

sunupupup opened this issue · comments

type DeepMutable<T extends object> = {
  -readonly [P in keyof T]: T[P] extends Function ? T[P] : T[P] extends object ? DeepMutable<T[P]> : T[P];
};