UNPKG

@refinedev/core

Version:

Refine is a React meta-framework for building enterprise-level, data-intensive applications rapidly with support for modern UI libraries and headless integrations.

19 lines 1.07 kB
import { type UseMutationOptions, type UseMutationResult } from "@tanstack/react-query"; import type { AuthActionResponse } from "../../../contexts/auth/types"; import type { RefineError } from "../../../contexts/data/types"; type Variables = { redirectPath?: string | false; }; export type UseLogoutProps<TVariables> = { mutationOptions?: Omit<UseMutationOptions<AuthActionResponse, Error | RefineError, (TVariables & Variables) | void, unknown>, "mutationFn">; }; export type UseLogoutReturnType<TVariables> = UseMutationResult<AuthActionResponse, Error | RefineError, (TVariables & Variables) | void, unknown>; /** * `useLogout` calls the `logout` method from the {@link https://refine.dev/docs/api-reference/core/providers/auth-provider `authProvider`} under the hood. * * @see {@link https://refine.dev/docs/api-reference/core/hooks/auth/useLogout} for more details. * */ export declare function useLogout<TVariables = {}>({ mutationOptions, }?: UseLogoutProps<TVariables>): UseLogoutReturnType<TVariables>; export {}; //# sourceMappingURL=index.d.ts.map