Closed kaleidawave closed 2 months ago
Think I am going to change LessThan
and GreaterThan
to range types
Will have a think about later if there is still stuff I want to add/change before merging tomorrow. But pretty happy with it for now.
Might have to change the range of Math.random
. Turns out it is [0, 1)
not [0, 1]
🤦♂️. Could do 0 | ExclusiveRange<0, 1>
? Will have to check that works
Merging before I get carried away with range division etc. Checking tests now up to 344 🎉
NaN
Not
works (using subtyping)infer T
in type annotation slice gets treated asinfer T extends string
(and also for generic arguments)Number.isNaN
checksGreaterThan
andLessThan
toInclusiveRange
andExclusiveRange
FloatRange
type~
,!
and-
prefix operators to be in terms ofx ^ 0xFFFF_FFFF
,x ? false : true
and0 - x
. RemovesConstructor::UnaryOperation
if (a)
where a isstring | falsy etc
and also to optional chaininga + b
is string or number toresult
field onConstructor::BinaryOperator { result }