mirror of
https://github.com/sindresorhus/type-fest.git
synced 2026-01-25 14:57:30 +00:00
12 lines
190 B
TypeScript
12 lines
190 B
TypeScript
import {Mutable} from '..';
|
|
|
|
type Foo = {
|
|
readonly a: number;
|
|
readonly b: string;
|
|
};
|
|
|
|
const ab: Mutable<Foo> = {a: 1, b: '2'};
|
|
ab.a = 2;
|
|
const ab2: Mutable<Readonly<Foo>> = ab;
|
|
ab2.a = 2;
|