io-ts icon indicating copy to clipboard operation
io-ts copied to clipboard

Missing codec for ReadonlyTuple

Open SRachamim opened this issue 3 years ago • 1 comments

🚀 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.

SRachamim avatar Nov 17 '21 12:11 SRachamim

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.

yoavShaked avatar Apr 20 '23 14:04 yoavShaked