type-challenges/questions/02793-medium-mutable

Mutable medium #readonly #object-keys

by jiangshan @jiangshanmeta

Take the Challenge    简体中文

Implement the generic Mutable<T> which makes all properties in T mutable (not readonly).

For example

interface Todo {
  readonly title: string
  readonly description: string
  readonly completed: boolean
}

type MutableTodo = Mutable<Todo> // { title: string; description: string; completed: boolean; }


Back Share your Solutions Check out Solutions