tyneq / Comparer
Type Alias: Comparer()<T>
Comparer<
T> = (a,b) =>number
Defined in: src/types/core.ts:52
A function that compares two values for ordering.
Type Parameters
| Type Parameter | Description |
|---|---|
T | The type of values being compared. |
Parameters
| Parameter | Type |
|---|---|
a | T |
b | T |
Returns
number
Remarks
Must return a negative number when a < b, a positive number when a > b, and 0 when equal. Matches the signature expected by Array.prototype.sort.