mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
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