-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Do not await iterated value in for-await-of #24474
Conversation
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.
Functional tests ❤️
case 0: return { value: 1, done: false }; | ||
case 1: return { value: Promise.resolve(2), done: false }; | ||
case 2: return { value: new Promise<number>(resolve => setTimeout(resolve, 100, 3)), done: false }; | ||
default: return { value: undefined: done: true }; |
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.
there is a typo on this line: undefined:
should be undefined,
Same in all other test cases below
@mhegazy do you want this ported to |
yes please. |
This change more closely aligns with the specified
for-await-of
semantics, per 13.7.5.13, step 6.d-6.h. At no time during those steps is there an Await for nextValue.Fixes #21115