Function firstKeyWithValueOf

  • Finds the first key on an enumerator that matches a specific value.

    Type Parameters

    • K

    • V

    Parameters

    • enumerator: Enumerator<K, V>

      The enum.

    • search: any

      The value to be searched within the enum's values.

    • comparator: ((search: V, enumValue: V) => boolean) = ...

      Function used to check the equality between search and the enum values. Default is a strict equality check (a === b).

        • (search: V, enumValue: V): boolean
        • Parameters

          • search: V
          • enumValue: V

          Returns boolean

    Returns keyof K

Generated using TypeDoc