mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Merge pull request #1676 from NativeScript/hdeshev/iterator-definition
Add typings for the ES6 Iterator interface for compatibility with rxjs.
This commit is contained in:
12
es-collections.d.ts
vendored
12
es-collections.d.ts
vendored
@ -47,3 +47,15 @@ declare var Set: {
|
||||
new<T>(l: List<T>): Set<T>;
|
||||
prototype: Set<any>;
|
||||
}
|
||||
|
||||
//Compatibility interfaces for rxjs
|
||||
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>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user