You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// your answerstypeUnionFromNumber<Lextendsnumber,Ansextendsunknown[]=[]>=Ans["length"]extendsL ? Ans[number] : UnionFromNumber<L,[...Ans,Ans["length"]]>typeNumberRange<Lextendsnumber,Hextendsnumber>=Exclude<UnionFromNumber<H>,UnionFromNumber<L>>|H
UnionFromNumber<L> generates a union type of 0 | 1 | ... | L-1. Therefore, using Exclude<UnionFromNumber<H>, UnionFromNumber<L>> yields a type of H | H + 1 | ... | L-2 | L-1. To include L in the type, we simply append L at the end.
The text was updated successfully, but these errors were encountered:
UnionFromNumber<L>
generates a union type of0 | 1 | ... | L-1
. Therefore, usingExclude<UnionFromNumber<H>, UnionFromNumber<L>>
yields a type ofH | H + 1 | ... | L-2 | L-1
. To include L in the type, we simply append L at the end.The text was updated successfully, but these errors were encountered: