DeepReadonly

Hard

Implement DeepReadonly<T> which makes all properties (including nested) readonly. Use generics and conditional types.

Examples:

Input 1: type Result = DeepReadonly<{ nested: { value: number } }>
Output 1: { readonly nested: { readonly value: number } }
Output
Run your code to see results.