devtypes - v1.1.0
    Preparing search index...

    Type Alias MutableProperty<T, K>

    MutableProperty: Omit<T, K> & { -readonly [P in K]: T[P] }

    Make a specific property mutable (remove readonly).

    Type Parameters

    • T

      The object type

    • K extends keyof T

      The key of the property to make mutable

    1.1.0

    Removes the readonly modifier from a single property while leaving others unchanged. Useful for controlled mutability in type-level object transformations.

    type Obj = { readonly a: string; readonly b: number };
    type Result = MutableProperty< Obj, 'a' >; // { a: string; readonly b: number }