Proposal: Typing an operator that takes an array (tuple) as an argument #6468
yukiyokotani
started this conversation in
Ideas / Feature request
Replies: 1 comment
-
Sorry, I was referring to an older version. I'm taking it down. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, operators that take an array (strictly speaking, a tuple in TypeScript) as an argument are typed separately according to the length of the array.
For example, the case of
combineLatest
is as follows.However, they can be aggregated into a single type definition using Valiadic Tuple Types, as follows.
This not only completes a single type definition, but also allows for tuple arguments of arbitrary length.
While there are some advantages in terms of type, I think the scope for modification is large.
How do you all feel about this proposal?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions