import * as RD from '@jvlk/fp-ts-remote-data'; import * as O from 'fp-ts/Option'; import * as TE from 'fp-ts/TaskEither'; import * as t from 'io-ts'; /** * @since 1.0.0 */ declare type OptionsWithDecoder = { queryKey: string[]; queryFn: TE.TaskEither>; decoder: t.Decoder; }; declare type OptionsWithoutDecoder = { queryKey: string[]; queryFn: TE.TaskEither>; }; /** * @since 1.0.0 */ declare function useRemoteDataQuery(options: OptionsWithDecoder): RD.RemoteData; declare function useRemoteDataQuery(options: OptionsWithoutDecoder): RD.RemoteData; /** * @since 1.0.0 */ /** * @since 1.0.0 */ declare function fold(remoteData: RD.RemoteData, loading: () => T, failure: (e: E) => T, empty: () => T, success: (a: A) => T): T; export { fold, useRemoteDataQuery };