Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e311620

Browse filesBrowse files
soda0289JamesHenry
authored andcommitted
Fix: Set await property on async iterators (for await) (fixes eslint#236) (eslint#239)
1 parent a294afa commit e311620
Copy full SHA for e311620

File tree

Expand file treeCollapse file tree

3 files changed

+506
-1
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+506
-1
lines changed

‎lib/ast-converter.js

Copy file name to clipboardExpand all lines: lib/ast-converter.js
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,11 +899,15 @@ module.exports = function(ast, extra) {
899899

900900
case SyntaxKind.ForInStatement:
901901
case SyntaxKind.ForOfStatement:
902+
var isAwait = node.awaitModifier
903+
&& node.awaitModifier.kind === ts.SyntaxKind.AwaitKeyword;
904+
902905
assign(result, {
903906
type: SyntaxKind[node.kind],
904907
left: convertChild(node.initializer),
905908
right: convertChild(node.expression),
906-
body: convertChild(node.statement)
909+
body: convertChild(node.statement),
910+
await: isAwait
907911
});
908912
break;
909913

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.