ts-toolbelt
ts-toolbelt copied to clipboard
[Improve]: Input limit of String.Join<> type
🐞 Bug Report
Describe the bug
Currently the Join<> type only works upto 22 input elements, after that It throws Type instantiation is excessively deep and possibly infinite.(2589)
Reproduce the bug
Expected behavior
Improve Join type to handle much larger inputs.
Possible Solution
Since 4.5, TS introduced tail recursion elimination on conditional types.
We can modify the Join function as such that it can handle inputs longer than 22 elements.
Screenshots
Current behaviour: