IComparer Interface
Packages > @fluidframework/common-utils > IComparer
Interface for a comparere
Signature:
export interface IComparer<T>
Properties
Property | Type | Description |
---|---|---|
min | T | The minimum value of type T |
Methods
Method | Description |
---|---|
compare(a, b) | Compare the two value |
Events
min
The minimum value of type T
Signature:
min: T;
Methods
compare
Compare the two value
Signature:
compare(a: T, b: T): number;
Parameters
Parameter | Type | Description |
---|---|---|
a | T | |
b | T |
Returns:
number
0 if the value is equal, negative number if a is smaller then b, positive number otherwise