Don‘t Use Readonly in TypeScript! Let‘s Build A Better Advanced One!

Опубликовано: 23 Февраль 2026
на канале: Typed Rocks
3,593
249

The Readonly type in TypeScript is a nice tool to make your object properties readonly. But there are many shortcomings in this builtin type. In this video we will fix many of them and make it much more usable.

Mentioned videos:
never type:    • The Never Type Explained: Everything You N...  
infer:    • Let's INFER some types - Advanced TypeScri...  
mapped types:    • Mapped Types Explained: Keep Your Types in...  


0:00 Intro
0:07 The issues
4:00 nested properties
6:24: setter function removal
10:05 Object.freeze properly typed