Skip to content

Order<A> = (self, that) => number

Defined in: packages/heap/src/order.ts:11

A total ordering on values of type A: a negative number when self < that, 0 when they are equivalent, and a positive number when self > that. Inspired by Effect’s Order.

The type parameter is contravariant: an Order<Supertype> is usable wherever an Order<Subtype> is expected (it only reads its arguments), never the other way around.

A

A

A

number