io-ts
io-ts copied to clipboard
Missing codec for ReadonlyTuple
🚀 Feature request
Current Behavior
Currently we have t.tuple
and t.readonly
.
Desired Behavior
We need a t.readonlyTuple
, which is an abstraction to flow(t.tuple, t.readonly)
. We can't really use this flow
solution because t.tuple
has overloads and flow
takes only the first one (which is an unary tuple
), but t.readonlyTuple
should support all available overloads (up to penta-tuple).
We already have t.readonlyArray
, so it makes sense to have the same abstraction also for t.tuple
.
I found many use cases in my firm to use t.readonlyTuple
, it will be much helpful for us
it make sense to have readonlyTuple sense we have readonlyArray.