Package: effect
Module: Types
Make all properties in T mutable. Supports arrays, tuples, and records as well.
Example
import type { Types } from "effect"
type MutableStruct = Types.Mutable<{ readonly a: string; readonly b: number }> // { a: string; b: number; }
type MutableArray = Types.Mutable<ReadonlyArray<string>> // string[]
type MutableTuple = Types.Mutable<readonly [string, number]> // [string, number]
type MutableRecord = Types.Mutable<{ readonly [_: string]: number }> // { [x: string]: number; }
Signature
type Mutable<T> = {
-readonly [P in keyof T]: T[P]
}
Since v2.0.0