TypeScript Associate — Hard
Key points
- DeepReadonly creates a deep readonly type by recursively applying readonly to all nested object properties.
- This ensures that all levels of nested objects are readonly, not just the top level.
- The key in keyof T syntax allows for iterating over all keys in T to apply the readonly modifier.
Ready to go further?
Related questions
