Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "Stream"

Index

Functions

changes

empty

  • Type parameters

    • A

    Returns Stream<A>

    A stream that never has any occurrences.

filter

  • Type parameters

    • A

    Parameters

    • fn: function

      A predicate function that returns a boolean for A.

        • (a: A): boolean
        • Parameters

          • a: A

          Returns boolean

    • stream: Stream<A>

      The stream to filter.

    Returns Stream<A>

    Stream that only contains the occurences from stream for which fn returns true.

isStream

  • isStream(obj: any): boolean

map

  • Type parameters

    • A

    • B

    Parameters

    • fn: function
        • (a: A): B
        • Parameters

          • a: A

          Returns B

    • stream: Stream<A>

    Returns Stream<B>

merge

mergeList

publish

  • publish<A>(a: A, stream: Stream<A>): void

scanS

  • The returned initially has the initial value, on each occurence in source the function is applied to the current value of the behaviour and the value of the occurence, the returned value becomes the next value of the behavior.

    Type parameters

    • A

    • B

    Parameters

    • fn: function
        • (a: A, b: B): B
        • Parameters

          • a: A
          • b: B

          Returns B

    • startingValue: B
    • stream: Stream<A>

    Returns Behavior<Stream<B>>

snapshot

snapshotWith

  • Type parameters

    • A

    • B

    • C

    Parameters

    • fn: function
        • (a: A, b: B): C
        • Parameters

          • a: A
          • b: B

          Returns C

    • behavior: Behavior<B>
    • stream: Stream<A>

    Returns Stream<C>

subscribe

  • subscribe<A>(fn: function, stream: Stream<A>): void
  • Type parameters

    • A

    Parameters

    • fn: function
        • (a: A): void
        • Parameters

          • a: A

          Returns void

    • stream: Stream<A>

    Returns void

switchStream

  • Takes a stream valued behavior and returns at stream that emits values from the current stream at the behavior. I.e. the returned stream always "switches" to the current stream at the behavior.

    Type parameters

    • A

    Parameters

    Returns Stream<A>

Generated using TypeDoc