TypeScript
Cannot assign to read only property
TypeScript rejected an assignment because the target property is marked readonly.
TypeScript
TypeScript rejected an assignment because the target property is marked readonly.
Observed message
Cannot assign to '{0}' because it is a read-only property.Why it happens
How to fix it
Official reference
TypeScript Handbook: Object TypesRelated errors
Explore more