1interface IEnumerable<T> { 2 3 zip<TResult>(second: IEnumerable<T>, resultSelector: (first: T, second: T, index: number) => TResult): IEnumerable<TResult>; 4 zip<TResult>(second: T[], resultSelector: (first: T, second: T, index: number) => TResult): IEnumerable<TResult>; 5 zip<TResult>(...params: any[]): IEnumerable<TResult>; // last one is selector 6 7 merge<TResult>(...params: IEnumerable<T>[]): IEnumerable<T>; 8 merge<TResult>(...params: T[][]): IEnumerable<T>; 9 10 11 concat(...sequences: IEnumerable<T>[]): IEnumerable<T>; 12 concat(...sequences: T[]): IEnumerable<T>; 13 14 insert(index: number, second: IEnumerable<T>): IEnumerable<T>; 15 16 sequenceEqual(second: IEnumerable<T>): boolean; 17 sequenceEqual<TCompare>(second: IEnumerable<T>, compareSelector: (element: T) => TCompare): boolean; 18 sequenceEqual(second: T[]): boolean; 19 sequenceEqual<TCompare>(second: T[], compareSelector: (element: T) => TCompare): boolean; 20 21 toDictionary<TKey>(keySelector: (element: T) => TKey): IDictionary<TKey, any>; 22 toDictionary<TKey, TValue>(keySelector: (element: T) => TKey, elementSelector: (element: T) => TValue): IDictionary<TKey, TValue>; 23 toDictionary<TKey, TValue, TCompare>(keySelector: (element: T) => TKey, elementSelector: (element: T) => TValue, compareSelector: (key: TKey) => TCompare): IDictionary<TKey, TValue>; 24} 25 26interface IDictionary<TKey, TValue> { 27 toEnumerable(): IEnumerable<{ key: TKey; value: TValue }>; 28}