Created
July 28, 2022 13:29
-
-
Save fostyfost/5f7d7fa95042fac5bc5656da730198a9 to your computer and use it in GitHub Desktop.
Writable (remove `readonly`)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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