rozaxe / r-value-observable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ValueObservable

Add a subclass of RxJS's Observable that has access to its current value.

const count$ = new BehaviorSubject<number>(42)
const valueObservable$ = count$ as ValueObservable<number>

valueObservable$.value // 42
valueObservable$.next(51) // Property 'next' does not exist on type 'ValueObservable<number>'.

About

License:MIT License