Skip to content

Instantly share code, notes, and snippets.

@Ibro
Last active April 26, 2017 04:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ibro/e121bc3978397e3e5961ae9ca66224a6 to your computer and use it in GitHub Desktop.
Save Ibro/e121bc3978397e3e5961ae9ca66224a6 to your computer and use it in GitHub Desktop.
Iterators Iterable IteratorResult - Coding Blast - www.codingblast.com
interface IteratorResult<T> {
done: boolean;
value: T;
}
interface Iterator<T> {
next(value?: any): IteratorResult<T>;
}
interface Iterable<T> {
[Symbol.iterator](): Iterator<T>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment