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
Implement listener subscription as async iterator protocol #20
Closed
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
5656357
feat: register event listener with asynchronous iterator protocol - c…
lorenzofox3 78cbcd6
keep single line block formatting
lorenzofox3 b50ec91
fix xo and test setting
lorenzofox3 c904739
enable xo
lorenzofox3 c951511
removed useless eslint flag comments
lorenzofox3 d9b617a
split async iterator behavior to different file
lorenzofox3 cac49ab
Revert "split async iterator behavior to different file"
novemberborn ade1383
Merge branch 'master' into pr/20
novemberborn a4d414d
Implement async iterator protocol without generators, fix tests
novemberborn a6a3476
Fix linting error
novemberborn e91559c
Simplify next() implementation
novemberborn c4ca867
Handle edge case where return() is called by an earlier listener for …
novemberborn e18c260
Implement return() according to spec
novemberborn edb7ac5
Remove unnecessary tsconfig files in test fixtures
novemberborn 756b47a
Change how TypeScript is loaded in types test
novemberborn 7ef2983
Return async iterator from .events(), not .on()
novemberborn 463c4e6
Implement .anyEvent()
novemberborn 3f9aa37
Tweak AVA's Babel options
novemberborn ef596e6
Support running tests without for-await-of transpilation
novemberborn 361cddd
Fix for-await transpilation
novemberborn 735ee10
Ensure async iterators return non-promise values
novemberborn 6d73663
Merge branch 'master' into pr/20
novemberborn 0afc521
Tweak iterator implementation now that scheduling is more consistent
novemberborn 4cdcd6f
Remove wrongly placed documentation
novemberborn 94f54c0
Separate iterator production
novemberborn File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
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
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.
It should be async too, take a
value
argument and return{done: true, value}
.https://tc39.github.io/proposal-async-iteration/#sec-asynciterator-interface