Type alias Writable<T>

Writable<T>: {
    -readonly [P in keyof T]: T[P]
}

Make type writable

Type Parameters

  • T

Example

const readonly = {a: [1]} as const         // -> { readonly a: readonly [1] }
type writable = Writable<typeof readonly> // -> {a: [1]}