StructuralComparable Interface
Package: @esfx/equatable
Represents a value that can compare its structure relationally with another value.
Declaration
export interface StructuralComparable
Methods
[StructuralComparable.structuralCompareTo](other, comparer)
Compares the structure of this value with another value using the supplied comparer, returning a value indicating one of the following conditions:
- A negative value indicates this value is lesser.
- A positive value indicates this value is greater.
- A zero value indicates this value is the same.
Declaration
[StructuralComparable.structuralCompareTo](other: unknown, comparer: Comparer<unknown>): number;
Parameters
- other
- unknown
The other value to compare against.
Returns
A numeric value indicating the relational comparison result.