Type Alias Comparator<T>

Comparator: (previous: T | undefined, current: T) => boolean

A function which determines if two values are equal. Implement custom comparators for distinct nodes that contain non-primitive values.

Type Parameters

  • T

    The type of values that the comparator compares.

Type declaration

    • (previous: T | undefined, current: T): boolean
    • Parameters

      • previous: T | undefined

        The value that previously passed through the node. can be undefined if the node has not emitted a value yet.

      • current: T

        The value currently passing.

      Returns boolean

      true if values should be considered equal.