Function filterMap

  • Create a new Map containing all elements from the source map that pass the provided test predicate.

    Type Parameters

    • K

    • V

    • S

    Parameters

    • map: ReadonlyMap<K, V>

      source map

    • predicate: ((value, key) => value is S)

      function to test each element of source map

        • (value, key): value is S
        • Parameters

          • value: V
          • key: K

          Returns value is S

    Returns Map<K, S>

  • Create a new Map containing all elements from the source map that pass the provided test predicate.

    Type Parameters

    • K

    • V

    Parameters

    • map: ReadonlyMap<K, V>

      source map

    • predicate: ((value, key) => boolean)

      function to test each element of source map

        • (value, key): boolean
        • Parameters

          • value: V
          • key: K

          Returns boolean

    Returns Map<K, V>

Generated using TypeDoc