Last active
June 22, 2017 08:00
-
-
Save gskachkov/e335c8971140f765b00df0ca8767b583 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@globalPrivate | |
function next() { | |
} | |
@globalPrivate | |
function return() { | |
} | |
@globalPrivate | |
function throw() { | |
} | |
@globalPrivate | |
function createAsyncFromSyncIterator(syncIterator) | |
{ | |
if (!@isObject(syncIterator)) new @TypeError('Only objects can be wrapped by async-from-sync wrapper'); | |
return new @AsyncFromSyncIteratorConstructor(syncIterator) | |
} | |
@globalPrivate | |
@constructor | |
function AsyncFromSyncIteratorConstructor(syncIterator) { | |
this.@syncIterator = syncIterator; | |
this.next = @next; | |
this.return = @return; | |
this.throw = @throw; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment