lazarljubenovic / jupiterate

1 stars 0 forks source link

feat(operators/chunk): improve types #15

Closed lazarljubenovic closed 1 year ago

lazarljubenovic commented 1 year ago

When the chunkSize value is known at compile-time, the return type of the operator will now reflect that and return a suitable union of tuples instead of an array with a generic length.

For example, chunk(3) will now return Operator<T, [T] | [T, T] | [T, T, T]> instead of Operator<T, Array<T>>.

Closes #13