"readonly" interface property is not working when modifying instance property using Object.defineProperty #40719
Labels
Design Limitation
Constraints of the existing architecture prevent this from being fixed


guybary-wix commentedSep 23, 2020
I was playing around with TS interface features, and I saw that setting a custom property configuration (Object.defineProperty) on an object that implements an interface with "readonly" is passing TS checks for the "readonly" interface property.
Expected behavior:
"Error: Cannot assign to 'x' because it is a read-only property..."
Since readonly property is being modified
Actual behavior:
Readonly property is writable
Related Issues:
#29634
The text was updated successfully, but these errors were encountered: