Variable IdentityConst

Identity: {
    hash: ((x) => number);
    compare(x, y) => number;
    fromLike<T>(value) => T;
}

Utilities for comparing and hashing object identities.

Type declaration

  • hash: ((x) => number)
      • (x): number
      • Returns a unique 32-bit hash value for a particular object instance.

        Parameters

        • x: object | null | undefined

        Returns number

  • compare:function
    • Returns the relative order of x with respect to y. Returns -1 if the hash code of object x is less than the hash code of object y; returns 1 if the hash code of object x is greater than the hash code of object y; and returns 0 if x and y are identical objects. If either x or y is null or undefined, then objects order before null, and null orders before undefined.

      Parameters

      • x: object
      • y: object

      Returns number

  • fromLike:function
    • Type Parameters

      • T

      Parameters

      • value: T

      Returns T

Generated using TypeDoc