Skip to content

JSDoc: Support @readonly tag #17233

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: JSDocRelates to JSDoc parsing and type generation