-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Basic support for generators as iterators #3031
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
Changes from 38 commits
d47f3be
8aa62b4
8dac1bf
124fdb6
d52c224
7f5a89a
be5557a
5c48620
a9e1d48
65222d6
eada0cd
21415af
623507c
95bfd7c
44777b9
7fce775
48a91b0
d163f83
a9055b8
ba1ed04
9f01952
37f5e41
9133ab6
fbce0a5
6183c81
28d9c6c
5fcc4e9
ce9dc32
8c1f5da
cf4ca1f
170bc5c
a14ec69
1a14725
7c6eed7
670ad05
cb198aa
63d2313
7e798e9
6037780
67c88a2
0a49128
33f8e56
faac853
059bb18
1e7c774
171b385
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -660,7 +660,7 @@ module ts { | |
|
||
export interface YieldExpression extends Expression { | ||
asteriskToken?: Node; | ||
expression: Expression; | ||
expression?: Expression; | ||
} | ||
|
||
export interface BinaryExpression extends Expression { | ||
|
@@ -1543,6 +1543,13 @@ module ts { | |
numberIndexType: Type; // Numeric index type | ||
} | ||
|
||
/* @internal */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this actually work if another comment follows it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure, how do I tell? Should I move it before? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seeing as |
||
// Just a place to cache element types of iterables and iterators | ||
export interface IterableOrIteratorType extends ObjectType, UnionType { | ||
iterableElementType?: Type; | ||
iteratorElementType?: Type; | ||
} | ||
|
||
// Type parameters (TypeFlags.TypeParameter) | ||
export interface TypeParameter extends Type { | ||
constraint: Type; // Constraint | ||
|
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.
When I read this, I feel like the second sentence is going to be counter in some way to the first. It is not, and it confuses me as I expect there to be some contradiction. Maybe we can work on the wording offline.
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 can remove the first sentence, or I can have the second sentence start on a new line. Would that help? The first sentence is not very interesting anyway.