-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
this can be seen in the nightly build as of Dec 17 (as well as at playground)
interface ReadOnlyData {
readonly value: number;
}
interface WritableData {
value: number;
}
function erase(data: WritableData): void {
data.value = 0;
}
const readOnly: ReadOnlyData = { value: 1 };
erase(readOnly); // expected a type error, actual: no problemthis can't be serious, can it?
why is it called readonly?
please note there are no type assertions or any other attempts to trick the type system, it just simply doesn't work
50+ errors left uncaught
UPDATE
constructive discussion starts here: #13002 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created