Recommended way to implement Iterator<T> in Typescript, before ES6
<p>I have a project that includes many classes that ideally would implement the <code>Iterable&lt;T&gt;</code> and/or <code>Iterator&lt;T&gt;</code> interfaces. However I cannot seem to find a standard TypeScript definition of these interfaces (for example in typescript-collections or some similar package).</p>

<p>I understand these are somewhat standardized in ECMAScript 6 through the <code>Symbol.iterator</code> mechanism, but my target is ECMAScript 5 and will stay so for the foreseeable future.</p>

<p>Can I somehow get these interfaces without defining them myself (for future compatibility with other modules, for example)?</p>