# Function filter

- filter<T>(set, callback): Set<T>

- Returns a new set with all elements that pass the test implemented by the provided callback function.

  #### Type Parameters

  - T

  #### Parameters

  - set: Set<T>

    The set to filter.

  - callback: ((value: T, set: Set<T>) => boolean)

    The callback function that acts as a predicate.

    - - (value, set): boolean

      - #### Parameters

        - value: T
        - set: Set<T>

        #### Returns boolean

  #### Returns Set<T>