javascript-collections-framework
    Preparing search index...

    Type Alias HashFunction

    HashFunction: (value: unknown) => number

    A hash function: returns a 32-bit integer for any value, the same one for equal values.

    [hashCodeSymbol] receives one, to hash nested values the way the caller does.

    Type Declaration

      • (value: unknown): number
      • Parameters

        • value: unknown

        Returns number

    const hash: HashFunction = hashCode
    hash('a') === hash('a') // true