New to Kendo UI for Angular? Start a free 30-day trial
Comparer
A type that represents a function which compares two values and returns 1
, 0
, or -1
(minus one).
For more information, refer to the composeSortDescriptors
configuration.
ts
const isGreaterThan: Comparer = (a, b) => a > b ? 1 : -1;
isGreaterThan(42, 42); // 0
isGreaterThan(22, 42); // -1
isGreaterThan(42, 22); // 1