@s-libs/rxjs-core
    Preparing search index...

    Function withHistory

    • Emits the upstream value as the first element in an array, followed by the last count values in reverse chronological order.

      source:         -1----2------3--------4--------5--------|
      withHistory(2): -[1]--[2,1]--[3,2,1]--[4,3,2]--[5,4,3]--|
      withHistory(0): -[1]--[2]----[3]------[4]------[5]------|

      Type Parameters

      • T

      Parameters

      • count: 0

      Returns OperatorFunction<T, [T]>

    • Emits the upstream value as the first element in an array, followed by the last count values in reverse chronological order.

      source:         -1----2------3--------4--------5--------|
      withHistory(2): -[1]--[2,1]--[3,2,1]--[4,3,2]--[5,4,3]--|
      withHistory(0): -[1]--[2]----[3]------[4]------[5]------|

      Type Parameters

      • T

      Parameters

      • count: 1

      Returns OperatorFunction<T, [T, T?]>

    • Emits the upstream value as the first element in an array, followed by the last count values in reverse chronological order.

      source:         -1----2------3--------4--------5--------|
      withHistory(2): -[1]--[2,1]--[3,2,1]--[4,3,2]--[5,4,3]--|
      withHistory(0): -[1]--[2]----[3]------[4]------[5]------|

      Type Parameters

      • T

      Parameters

      • count: 2

      Returns OperatorFunction<T, [T, T?, T?]>

    • Emits the upstream value as the first element in an array, followed by the last count values in reverse chronological order.

      source:         -1----2------3--------4--------5--------|
      withHistory(2): -[1]--[2,1]--[3,2,1]--[4,3,2]--[5,4,3]--|
      withHistory(0): -[1]--[2]----[3]------[4]------[5]------|

      Type Parameters

      • T

      Parameters

      • count: 3

      Returns OperatorFunction<T, [T, T?, T?, T?]>

    • Emits the upstream value as the first element in an array, followed by the last count values in reverse chronological order.

      source:         -1----2------3--------4--------5--------|
      withHistory(2): -[1]--[2,1]--[3,2,1]--[4,3,2]--[5,4,3]--|
      withHistory(0): -[1]--[2]----[3]------[4]------[5]------|

      Type Parameters

      • T

      Parameters

      • count: 4

      Returns OperatorFunction<T, [T, T?, T?, T?, T?]>

    • Emits the upstream value as the first element in an array, followed by the last count values in reverse chronological order.

      source:         -1----2------3--------4--------5--------|
      withHistory(2): -[1]--[2,1]--[3,2,1]--[4,3,2]--[5,4,3]--|
      withHistory(0): -[1]--[2]----[3]------[4]------[5]------|

      Type Parameters

      • T

      Parameters

      • count: number

      Returns OperatorFunction<T, [T, ...T[]]>