Ts Playground 35 !full! -
Happy typing. — The TypeScript Playground Team
type DeepReadonly<T> = { readonly [P in keyof T]: DeepReadonly<T[P]>; }; interface ApiResponse { user: { name: string; settings: { theme: string } }; } ts playground 35
There's a special kind of magic when a tool becomes so intuitive that you stop noticing it's there. The has always been that magic — a blank canvas where ideas turn into compiled JavaScript before you even finish typing. Happy typing
let data: DeepReadonly<ApiResponse>; data.user.settings.theme = "dark"; // Error: Cannot assign to 'theme' settings: { theme: string } }
Date: April 14, 2026 Author: TypeScript Team / Community Spotlight
Paste your favorite type puzzle. See what breaks — or beautifully, finally, works.