/// <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) => T | undefined;
type Validator<T> = (raw: any) => raw is T;
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];
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, body?: string) => Observable<T | undefined>;
export {};
