8 lines
149 B
TypeScript
8 lines
149 B
TypeScript
|
interface ReadonlyData {
|
||
|
readonly value: string;
|
||
|
}
|
||
|
|
||
|
const data: ReadonlyData = { value: 'foo' };
|
||
|
const clone = { ...data };
|
||
|
clone.value = 'bar';
|