Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Behavior<A>

A behavior is a value that changes over time. Conceptually it can be though of as a function from time to a value. I.e. type Behavior<A> = (t: Time) => A.

Type parameters

  • A

Hierarchy

Implements

Index

Constructors

constructor

Properties

child

child: Observer<any>

last

last: A

nrOfListeners

nrOfListeners: number

of

of: function = of

Type declaration

pushing

pushing: boolean

Static of

of: function = of

Type declaration

Methods

addListener

beginPulling

  • beginPulling(): void

chain

endPulling

  • endPulling(): void

map

  • Type parameters

    • B

    Parameters

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

          • a: A

          Returns B

    Returns Behavior<B>

pull

  • pull(): A

push

  • push(a: any): void

removeListener

  • removeListener(listener: Observer<any>): void

subscribe

  • Parameters

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

          • a: A

          Returns void

    Returns Observer<A>

Generated using TypeDoc