Optional
compareFn: ((x: any, y: any) => number) = compareCustom compare function
Checks whether x
is a comparable type and returns the result of x.compare(y)
.
Otherwise the return value of the compare function is equivalent to obj === other ? 0 : obj < other ? -1 : 1
The comparison result
An initial value
Other value to compare
Generated using TypeDoc
Push the value
item
onto theheap
, maintaining the heap invariant.