From a4ab5894c2d18f6111f876b9672f5a3a9d8e32a0 Mon Sep 17 00:00:00 2001 From: Hristo Deshev Date: Tue, 1 Mar 2016 11:50:27 +0200 Subject: [PATCH] Add typings for the ES6 Iterator interface for compatibility with rxjs. --- es-collections.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/es-collections.d.ts b/es-collections.d.ts index c55bfd143..12a5cff7b 100644 --- a/es-collections.d.ts +++ b/es-collections.d.ts @@ -47,3 +47,15 @@ declare var Set: { new(l: List): Set; prototype: Set; } + +//Compatibility interfaces for rxjs +interface IteratorResult { + done: boolean; + value?: T; +} + +interface Iterator { + next(value?: any): IteratorResult; + return?(value?: any): IteratorResult; + throw?(e?: any): IteratorResult; +}