Skip to Content
typesWriteable

Writeable

See source on Github

Removes readonly from array or tuple literal types.

Example

const test = [1, 2, 3] as const const test2 = { a: 'a', b: 'b' } as const; type Test = Writeable<typeof test>; // [1, 2, 3] type Test2 = Writeable<typeof test2>; // { a: 'a', b: 'b' }