import { Observable } from 'rxjs/internal/Observable'; import { Subject } from 'rxjs/internal/Subject'; import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject'; /** * Returns `true` if a given observable has a next() method. * @param subject$ */ export declare function hasNext(subject$: Observable | Subject | BehaviorSubject): subject$ is Subject | BehaviorSubject; /** * Gets initial value if the root observable is a behavior subject (as this will emit synchronously) * @param observable$ */ export declare const UNSET_VALUE: {}; export declare function initialObservableValue(observable$: Observable): T | {}; /** * `useRxState` * * Returns current value and a callback to change it by mutating a given subject. * Returns only current value in case of Observable. * * Example: * const [name, setName] = useRxState(name$) * where name$ could be new BehaviorSubject('None'); * * setName('Alice') under the hood will call name$.next('Alice') * * @param subject$ */ export declare function useRxState | Subject | BehaviorSubject>(subject$: S): S extends BehaviorSubject ? [T, (value: T) => void] : S extends Subject ? [T | undefined, (value: T) => void] : S extends Observable ? [T | undefined] : never; /** * `useRxStateResult` * * For a given observable returns a current value. * * Example: * const name = useRxStateResult(name$) * * @param observable$ */ export declare function useRxStateResult(observable$: Observable): T | undefined; /** * `useRxStateAction` * * For a given subject returns a set function. * * Example: * const setName = useRxStateResult(name$); */ export declare function useRxStateAction(subject$: Subject): (value: T) => void;