Closed cyberixae closed 4 years ago
The said Tuple type library has some problems with latest TypeScript version ksxnodemodules/typescript-tuple#8
@cyberixae this kind of operations on tuples seems pretty rare.
Anyway I would stay away from such a risky type-level programming in TypeScript.
For the record I think Tuple operations are mostly useful for currying and uncurrying functions. It doesn't matter so much when using functions that are curried out of the box but is still relevant for compatibility with uncurried functions. Whether or not such compatibility should or should not be implemented in fp-ts is another thing entirely. Perhaps we'll eventually get native support in TypeScript. See microsoft/TypeScript#33783
🚀 Feature request
It would be nice to have some basic operations for tuples.Namely
prepend
,append
,concat
andreverse
.Suggested Solution
I ended up writing my own implementation for some of them with types from package typescript-tuple. For some reason the package provides types without implementation. See ksxnodemodules/typescript-tuple#18