nrgy
Version:
The library for reactive programming using efficient computing and MVC/MVVM patterns
31 lines (28 loc) • 898 B
text/typescript
import { Observable } from 'rxjs';
import { A as Atom, S as Signal } from './types-CxOJPpKX.cjs';
/**
* Options for `observe`
*/
type SignalObserveOptions = {
sync?: boolean;
};
/**
* Options for `observe`
*/
type AtomObserveOptions = {
sync?: boolean;
onlyChanges?: boolean;
};
/**
* Exposes the value of an `Atom` as an RxJS `Observable`.
*
* The atom's value will be propagated into the `Observable`'s subscribers using an `effect`.
*/
declare function observe<T>(source: Atom<T>, options?: AtomObserveOptions): Observable<T>;
/**
* Exposes the value of an `Atom` as an RxJS `Observable`.
*
* The atom's value will be propagated into the `Observable`'s subscribers using an `effect`.
*/
declare function observe<T>(source: Signal<T>, options?: SignalObserveOptions): Observable<T>;
export { type AtomObserveOptions as A, type SignalObserveOptions as S, observe as o };