Skip to content

Files

Latest commit

d268ded · Jun 3, 2022

History

History
This branch is 56 commits behind type-challenges/type-challenges:main.

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