UNPKG

@data-client/core

Version:

Async State Management without the Management. REST, GraphQL, SSE, Websockets, Fetch

21 lines 762 B
import type Controller from '../controller/Controller.js'; import { UnknownError } from '../index.js'; import type { Manager, Middleware } from '../types.js'; /** Handling network unauthorized indicators like HTTP 401 * * @see https://dataclient.io/docs/api/LogoutManager */ export default class LogoutManager implements Manager { constructor({ handleLogout, shouldLogout }?: Props); middleware: Middleware; cleanup(): void; protected shouldLogout(error: UnknownError): boolean; handleLogout(controller: Controller): void; } type HandleLogout = (controller: Controller) => void; interface Props { handleLogout?: HandleLogout; shouldLogout?: (error: UnknownError) => boolean; } export {}; //# sourceMappingURL=LogoutManager.d.ts.map