argument of .zip()
kasugaiasuka opened this issue · comments
kasugaiasuka commented
IEnumerable<T>.zip() accepts U[] (or IEnumerable<U>) as the first argument.
Enumerable.from([1, 2, 3])
.zip(["a", "b", "c"], (first, second) => `${first}${second}`)
.toArray();
// => ["1a", "2b", "3c"]
So, definitions should be like this:
zip<U, TResult>(second: IEnumerable<U>, resultSelector: (first: T, second: U, index: number) => TResult): IEnumerable<TResult>;
zip<U, TResult>(second: { length: number;[x: number]: U; }, resultSelector: (first: T, second: U, index: number) => TResult): IEnumerable<TResult>;
zip<U, TResult>(second: U[], resultSelector: (first: T, second: U, index: number) => TResult): IEnumerable<TResult>;
Mihai Ciuraru commented
This seems to be correct, I will make the changes.
Mihai Ciuraru commented
Resolved (b815a82), thanks for your help.