/// <reference types="react" />
import { BehaviorSubject, ReplaySubject, Observable } from "rxjs";
export declare const useObservable: <T>(val: T, type?: "behavior" | "replay") => Observable<T>;
export declare const useObsRef: <T>(obs?: Observable<T> | undefined) => import("react").MutableRefObject<T | undefined>;
export declare const useObsState: <T>(obs?: Observable<T> | undefined, init?: boolean | undefined) => T | undefined;
declare type Validator<T> = (raw: any) => raw is T;
declare type SubjectType = "behavior" | "replay" | undefined;
export declare const useSubject: <T = undefined, ST extends SubjectType = SubjectType>(initial?: T | undefined, type?: ST | undefined) => ST extends "replay" ? ReplaySubject<T> : BehaviorSubject<T>;
export declare const useState$: <T = undefined>(initValue?: T | undefined) => readonly [BehaviorSubject<T> | ReplaySubject<T>, (value: T) => void];
declare type FetchOptions<T> = {
    validate: Validator<T>;
    onAfter?: () => void;
    onBefore?: () => void;
    onError?: (e: unknown) => void | boolean;
    retryTimeout?: number;
} & Omit<RequestInit, "body">;
export declare const useFetchCreator: <T>(params: FetchOptions<T>) => (query?: string | undefined, body?: string | undefined) => Observable<T | undefined>;
export {};
