-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Domain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
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 9 moreniedzielskiniedzielski and ranndev
Metadata
Metadata
Assignees
Labels
Domain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript