Guest User

Untitled

a guest
Dec 11th, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. type ReadonlyObject<A> = { readonly [K in keyof A]: A[K] };
  2. type DeepReadonlyObject<A> = { readonly [K in keyof A]: DeepReadonly<A[K]> }
  3.  
  4. type X = DeepReadonlyObject<{ key: string, key1: number }>; // { readonly key: any; readonly key1: any; }
Add Comment
Please, Sign In to add comment