@data-client/core
Version:
Async State Management without the Management. REST, GraphQL, SSE, Websockets, Fetch
22 lines (21 loc) • 774 B
TypeScript
import Controller from '../controller/Controller.js';
import { UnknownError } from '../index.js';
import { 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