Looks like the arithmetic only supports integers 0 through 10
https://github.com/ronami/meta-typing/blob/master/src/utils/...
https://github.com/ronami/meta-typing/blob/master/src/utils/...
e.g. :
type zero = []
type Inc<N extends string[]> = [...N,'']
type Dec<N extends string[]> = N extends [...infer T,''] ? T : never
type one = Inc<zero>
type two = Inc<one>
type oneb = Dec<two>Another approach which I tried is to do arithmetics on digits directly, storing digits in a tuple instead, but the code is not as elegant as the tuple one
https://github.com/dqbd/ts-math-evaluate/blob/main/src/math/...