Check out example codes for "make an interface iterator typescript". It will help you in understanding the concepts better.

Code Example 1

interface Iterable<T> {
    [Symbol.iterator](): Iterator<T>;
}

Learn ReactJs, React Native from akashmittal.com