Created
December 11, 2018 14:20
-
-
Save przemyslawjanpietrzak/d2e81b76127b8955821e1bdb604b5dd1 to your computer and use it in GitHub Desktop.
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 ReadonlyObject<A> = { readonly [K in keyof A]: A[K] }; | |
type DeepReadonlyObject<A> = { readonly [K in keyof A]: DeepReadonly<A[K]> } | |
type X = DeepReadonlyObject<{ key: string, key1: number }>; // { readonly key: any; readonly key1: any; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment