A little secret to rock your YouTube subscribers
Get Free YouTube Subscribers, Views and Likes

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

Follow
Typed Rocks

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 ...  
infer:    • Let's INFER some types  Advanced Typ...  
mapped types:    • Mapped Types Explained: Keep Your Typ...  


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

posted by danielle75474f3