@edsilv/exjs
Version:
Extension library
28 lines (23 loc) • 625 B
text/typescript
/// <reference path="symbol.es5.ts" />
interface SymbolConstructor {
/**
* A method that returns the default iterator for an object. Called by the semantics of the
* for-of statement.
*/
readonly iterator: symbol;
}
interface IteratorResult<T> {
done: boolean;
value: T;
}
interface Iterator<T> {
next(value?: any): IteratorResult<T>;
return?(value?: any): IteratorResult<T>;
throw?(e?: any): IteratorResult<T>;
}
interface Iterable<T> {
[](): Iterator<T>;
}
interface IterableIterator<T> extends Iterator<T> {
[](): IterableIterator<T>;
}