You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use t.tuple, it starts to error once I put 6 types. This is my code: t.tuple([t.number, t.number, t.number, t.number, t.number, t.number, t.any, t.number])
Activity
ForbesLindesay commentedon Apr 9, 2020
I've submitted a PR that resolves this, but only for TypeScript 3.8+. If you're using TypeScript 3.8, you can workaround this for now via:
and then use
tuple
in place oft.tuple
.ForbesLindesay commentedon Apr 9, 2020
Forgot to mention, you will also need to mark the input
as const
e.g.ForbesLindesay commentedon Apr 10, 2020
You can actually make it work without the
as const
:This forces TypeScript to infer TCodecs as a tuple, rather than an array.
intersection
#312