d3/d3-array

Enable `Iterable` input as second argument in `superset` method

goyaltushar92 opened this issue · 1 comments

Current Implementation of superset method accepts 1st argument of Iterable type while 2nd Argument uses lenght property so is limited to Array/Array-like. As subset method internally uses superset, so both can use does not align. If we create typedef for current methods it would be something like this.

export default function superset<T>(values: Iterable<T>, other: Array<T>): boolean;
export default function subset<T>(values:  Array<T>, other: Iterable<T>): boolean;

It would be better if we can enable having Iterable for both arguments.

I realized later on I was seeing on old code, when I created this issue