Skip to content

Instantly share code, notes, and snippets.

@fostyfost
Created July 28, 2022 13:29
Show Gist options
  • Save fostyfost/5f7d7fa95042fac5bc5656da730198a9 to your computer and use it in GitHub Desktop.
Save fostyfost/5f7d7fa95042fac5bc5656da730198a9 to your computer and use it in GitHub Desktop.
Writable (remove `readonly`)
type Writeable<T> = {
-readonly [Key in keyof T]: T[Key]
}
type DeepWriteable<T> = {
-readonly [Key in keyof T]: DeepWriteable<T[Key]>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment