Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumTypeScripthand-rolled utility typesSingle-choice MCQ

This hand-rolled Mutable is meant to strip readonly. What is the type of T?

type Mutable<O> = { -readonly [K in keyof O]: O[K]; }; type T = Mutable<{ readonly a: number; readonly b?: string }>;