-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Support ES6 built-in symbols #1978
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
11d75ef
Allow Symbol indexer in ES6
JsonFreeman b30d8f3
Change computed property error messages to be about symbols
JsonFreeman 39952b1
Syntactically allow computed properties everywhere if the name looks …
JsonFreeman d788624
Move hasDynamicName to utilities.ts
JsonFreeman 07f3641
Update hasDynamicName to take well known symbols into account
JsonFreeman f344654
Add named property symbol for known Symbol properties
JsonFreeman 30892af
Change computed property error message to mention Symbols
JsonFreeman 9cb38fb
Create global Symbol type
JsonFreeman 25fcbe2
Change certain hasDynamicName checks to check the SyntaxKind instead
JsonFreeman b60fa14
Add tests for operators with symbol operand
JsonFreeman 779661c
Add tests for symbol properties
JsonFreeman 95af997
Accept correct baselines for symbol property tests
JsonFreeman e508bf7
Add symbol keyword
JsonFreeman ebdd96b
Update tests to use new symbol keyword
JsonFreeman e346b70
Change isTypeOfKind calls to pass symbol TypeFlag when needed
JsonFreeman 59a704e
Rename references in es6.d.ts from Symbol to symbol
JsonFreeman d793658
Change Symbol to symbol in error messages
JsonFreeman 2d16474
Fix expression checking for symbols
JsonFreeman 6a6c03b
Fix error message wording
JsonFreeman 92617f5
Don't pass prop.name directly for error reporting
JsonFreeman fbeadbc
Add test for new Symbol()
JsonFreeman 9f39a53
Make Symbol the apparent type of symbol
JsonFreeman df826de
symbols in type guards
JsonFreeman d07ed67
Support indexing with known symbols
JsonFreeman 8325862
Fix error message
JsonFreeman 3834edd
Refactor part of getPropertyNameForIndexedAccess into checkSymbolName…
JsonFreeman 4c09ccd
Check that Symbol properties are proper, and support downlevel type c…
JsonFreeman 3560442
Declaration emit for symbol properties
JsonFreeman 2f3c32a
Navigation bar support for symbols
JsonFreeman eb50619
Disable symbol indexer
JsonFreeman 52cb13e
Uncomment symbol properties in es6.d.ts
JsonFreeman 75382c1
Accept baselines after rebase
JsonFreeman 18276e5
Address feedback from @yuit
JsonFreeman a94e61b
Merge branch 'master' of https://github.com/Microsoft/TypeScript into…
JsonFreeman 486cebd
Merge branch 'master' of https://github.com/Microsoft/TypeScript into…
JsonFreeman 4942c5f
Address feedback
JsonFreeman 9c273d8
Merge branch 'master' of https://github.com/Microsoft/TypeScript into…
JsonFreeman 65d831e
Merge branch 'master' of https://github.com/Microsoft/TypeScript into…
JsonFreeman ac829a8
Error for naming an interface 'symbol'
JsonFreeman 7d7d54f
Merge branch 'master' of https://github.com/Microsoft/TypeScript into…
JsonFreeman 935c602
Rebaseline after merge
JsonFreeman 59dc7d3
Address feedback
JsonFreeman dd6a129
Merge branch 'master' of https://github.com/Microsoft/TypeScript into…
JsonFreeman 47404bc
Merge branch 'master' of https://github.com/Microsoft/TypeScript into…
JsonFreeman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 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 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 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 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.
What exactly happens when I make an object like the following?
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.
I have a test for that (tests/cases/conformance/es6/Symbols/symbolProperty17.ts). Internally it becomes "___@iterator" (with 3 underscores). This is done by escapeIdentifier