gvergnaud / hotscript

A library of composable functions for the type-level! Transform your TypeScript types in any way you want using functions you already know.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug report]: `Unions.Range` end value

brandonmcconnell opened this issue · comments

Re #41

I could be mistaken, but I don't think Unions.Range includes the final element. In other words, Unions.Range<1, 3> would match 1 and 2, but not 3.

Including the final element by default would be more intuitive in my opinion, and would only require a small adjustment to the function (something like | EndValue).

It's included, the ordering is just a bit funky:
image

https://tsplay.dev/WG28Xm

Ah nice! I didn't test. I just didn't see it accounted for in the implementation. Thanks!