-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Readonly properties and index signatures #6532
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
Merged
Merged
Changes from 16 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
b46efc9
Allow modifies on type members + introduce "readonly" modifier
ahejlsberg 07b7008
Accepting new baselines
ahejlsberg d504357
Check readonly in assignments and type relations
ahejlsberg 8319f2e
Accepting new baselines
ahejlsberg 07763ed
Removing unused function
ahejlsberg 5b233e4
Refactor to introduce IndexInfo type
ahejlsberg b8cd0e5
Support readonly indexers + include readonly modifier in typeToString
ahejlsberg 17b5899
Fixing fourslash test
ahejlsberg 13f763d
Accepting new baselines
ahejlsberg 2a20e91
Allow assignments to readonly properties in constructors
ahejlsberg 01c9686
Allow 'readonly' only on property and index signature declarations
ahejlsberg d3be38e
Updating error messages
ahejlsberg 723475b
Accepting new baselines
ahejlsberg a499607
Merge branch 'master' into readonlyMembers
ahejlsberg dc8ab95
Chaning "read-write" to "writable" in error messages
ahejlsberg 4abf717
Accepting new baselines
ahejlsberg cac3a32
Add ReadonlyArray<T> to core.d.ts
ahejlsberg 8bb00fe
Consider ReadonlyArray<T> an array-like type
ahejlsberg fc6947b
Make get only accessor compatible with writable property in type rela…
ahejlsberg 9562353
Fixing fourslash test
ahejlsberg b6f43e6
Accepting new baselines
ahejlsberg fac1bf6
Disallow assigments to exported variables from external modules
ahejlsberg e506378
Accepting new baselines
ahejlsberg ee0060b
No readonly checks in type relationships + No assignments through nam…
ahejlsberg 7405a4b
Accepting new baselines
ahejlsberg 49dd54e
Include readonly in type equality checks + Treat more symbols as read…
ahejlsberg ea4e3af
Fix tests
ahejlsberg c78ee72
Accepting new baselines
ahejlsberg c826a90
Merge branch 'master' into readonlyMembers
ahejlsberg 7561642
Adding const/readonly to core.d.ts and es6.d.ts
ahejlsberg 0b1f0d8
Accepting new baselines
ahejlsberg 77d174a
Adding tests
ahejlsberg da107fe
Accepting new baselines
ahejlsberg cbb195b
Renumbering NodeFlags to start at 1 << 0
ahejlsberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like
1 << 0
is available (?) if you want to avoid renumbering the whole enum.