Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Subscription<A, B>

Type parameters

  • A

  • B

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected cacheLast

cacheLast: boolean

closeIn

closeIn: CloseMode

closeOut

closeOut: CloseMode

id

id: string

Protected last

last: any

Protected Optional parent

parent: ISubscribable<A>

Protected state

state: State = State.IDLE

Protected subs

subs: ISubscriber<B>[]

Protected Optional xform

xform: Reducer<B[], A>

Methods

Protected addWrapped

Protected cleanup

  • cleanup(): void

deref

  • deref(): B | undefined

Protected dispatch

  • dispatch(x: B): void

done

  • done(): void

Protected ensureState

  • ensureState(): void

error

  • error(e: any): void

getState

map

next

  • next(x: A): void

subscribe

subscribeAll

transform

  • transform<C>(a: Transducer<B, C>, opts?: Partial<CommonOpts>): Subscription<B, C>
  • transform<C, D>(a: Transducer<B, C>, b: Transducer<C, D>, opts?: Partial<CommonOpts>): Subscription<B, D>
  • transform<C, D, E>(a: Transducer<B, C>, b: Transducer<C, D>, c: Transducer<D, E>, opts?: Partial<CommonOpts>): Subscription<B, E>
  • transform<C, D, E, F>(a: Transducer<B, C>, b: Transducer<C, D>, c: Transducer<D, E>, d: Transducer<E, F>, opts?: Partial<CommonOpts>): Subscription<B, F>

unsubscribe

  • If called without arg, removes this subscription from parent (if any), cleans up internal state and goes into DONE state. If called with arg, removes the sub from internal pool and if no other subs are remaining also cleans up itself and goes into DONE state.

    Parameters

    Returns boolean

Generated using TypeDoc