@tempots/std
Compare type
Represents a function that compares two values of type T and returns a number. The returned number indicates the relative order of the two values: - A negative number if a
is less than b
. - Zero if a
is equal to b
. - A positive number if a
is greater than b
.
Signature:
export type Compare = (a: T, b: T) => number;