Created
March 22, 2019 08:42
-
-
Save tomi/66d127f3a3797ead2dbbd7d4fe3ce696 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
interface Iterable<T> { | |
[Symbol.iterator](): Iterator<T>; | |
} | |
interface Iterator<T> { | |
next(value?: any): IteratorResult<T>; | |
return?(value?: any): IteratorResult<T>; | |
throw?(e?: any): IteratorResult<T>; | |
} | |
interface IteratorResult<T> { | |
done: boolean; | |
value: T; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment