-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
interface X {
readonly value: 'x';
}
interface Y {
value: 'y';
}
type Z = X | Y;
var z: Z = <Z>{ value: 'y' };
z.value = 'x'; // expected an error saying that value: 'x' is readonly and cannot be set, actual OKUPDATE:
even this example doesn't work (with both possible options being readonly)
interface X {
readonly value: 'x';
}
interface Y {
readonly value: 'y';
}
type Z = X | Y;
var z: Z = <Z>{ value: 'y' };
z.value = 'x'; // expected an error saying that value: 'x' is readonly and cannot be set, actual OKMetadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue