Created
January 14, 2020 10:20
-
-
Save guilhermepontes/6951472742788f5f7ae8a447cf3aec8d to your computer and use it in GitHub Desktop.
Immutable type
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 Immutable<T> = { | |
readonly [K in keyof T]: Immutable<T[K]>; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment