Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Document readonly #323

Merged
merged 4 commits into from
Jun 24, 2016
Merged

Document readonly #323

merged 4 commits into from
Jun 24, 2016

Conversation

sandersn
Copy link
Member

Fixes #311

@mhegazy
Copy link
Contributor

mhegazy commented Jun 24, 2016

can you also add a note about getters with no setters are inferred to be readonly properties.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 24, 2016

👍

@sandersn
Copy link
Member Author

I thought about adding that note, but I'm not sure what difference it makes? Just in the .d.ts, right?

@mhegazy
Copy link
Contributor

mhegazy commented Jun 24, 2016

for usage as well.

class C {
    get x() { return 0; }
}
c.x = 1; // Error

@sandersn
Copy link
Member Author

Right, but readonly doesn't add anything that wasn't there before. The only change is in the type. I'll make the note.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 24, 2016

might not be worth it... up to you.

@sandersn
Copy link
Member Author

I went ahead with it. I didn't think about the .d.ts case when I first made the decision not to document it.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 24, 2016

👍

@sandersn sandersn merged commit 39e298d into release-2.0 Jun 24, 2016
@sandersn sandersn deleted the readonly branch June 24, 2016 23:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants