IComparer Interface

Packages > @fluidframework/common-utils > IComparer

Interface for a comparere

Signature:

export interface IComparer<T> 

Properties

List of properties of this interface
Property Type Description
min T The minimum value of type T

Methods

List of methods of this class
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

List of 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