Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Previously, `Symbol.iterator` was just typed as `string`. Now, it is typed with the polyfilled value (that we also use internally). Maybe one day in the future we can actually use symbols as property keys, but until then this is an improvement from the previous state. Reviewed By: mroch Differential Revision: D27611562 fbshipit-source-id: bf31193eb353a532dbeb2eb1ba397fb57fe18097
- Loading branch information
1 parent
ad6424b
commit 1757859
Showing
3 changed files
with
26 additions
and
2 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
declare var foo: { | ||
@@iterator: Iterator<number>, | ||
}; | ||
|
||
(foo[Symbol.iterator]: Iterator<number>); // OK | ||
(foo[Symbol.iterator]: boolean); // Error |
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