Currently if you merge any number of bindings there is a type problem where the return type can be any[] which in turn means that you can't do .as() on the return values without the hint suggestion giving a warning.
The current mergeBindings function accepts any number of elements in an array with type any as argument. In my implementation the type is restricted to bindings and has a minimum of 2 bindings that must be provided. This allows removal of filtering and cases where the length of the array is 0 or 1 since it becomes unnecessary. Also the return type is explicitly declared since the return type in the previous implementation can return a any[] (although this is unnecessary).
Currently if you merge any number of bindings there is a type problem where the return type can be any[] which in turn means that you can't do .as() on the return values without the hint suggestion giving a warning.
The current mergeBindings function accepts any number of elements in an array with type any as argument. In my implementation the type is restricted to bindings and has a minimum of 2 bindings that must be provided. This allows removal of filtering and cases where the length of the array is 0 or 1 since it becomes unnecessary. Also the return type is explicitly declared since the return type in the previous implementation can return a any[] (although this is unnecessary).