New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler allows assignments to read-only properties #339

mwisnicki opened this Issue Aug 2, 2014 · 1 comment


None yet
2 participants
Copy link

mwisnicki commented Aug 2, 2014

"use strict";
class SomeClass {
    public get someProperty(): string {
        return "some value";
var someInstance = new SomeClass();
someInstance.someProperty = "another value"; //Run-time error. ECMAScript 5.1 - 11.13.1

This comment has been minimized.

Copy link

RyanCavanaugh commented Aug 4, 2014

Duplicate of #12

Defining a get-only accessor does not create a read-only property because TypeScript does not have a notion of read-only properties

@Microsoft Microsoft locked and limited conversation to collaborators Jun 18, 2018

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