Closed

Description
TypeScript Version: nightly (2.5.0-dev.20170712)
Code
class C {
constructor() {
/**
* @readonly
* @type {number}
*/
this.x = 0;
}
m() {
this.x = "1"; // Error
this.x = 1; // No error
}
}
Expected behavior:
Both lines in m
are errors.
Actual behavior:
No error when trying to write to @readonly
property.
icopp, niedzielski, lepsch, cardin, dsifford and 8 moreniedzielskiniedzielski and ranndev
Metadata
Metadata
Assignees
Labels
Relates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyNot yet reached consensusNot yet reached consensusAn idea for TypeScriptAn idea for TypeScript