@nfid/identitykit
Version:
A React library for adding wallet connections to dApps.
30 lines (29 loc) • 871 B
TypeScript
import { TimeoutManager } from "./timeout-manager";
export type IdleManagerOptions = {
/**
* capture scroll events
* @default false
*/
captureScroll?: boolean;
/**
* scroll debounce time in ms
* @default 100
*/
scrollDebounce?: number;
/**
* Callback after the user has gone idle
*/
onIdle?: () => unknown;
/**
* timeout in ms
*/
idleTimeout?: number;
};
/**
* Detects if the user has been idle for a duration of `idleTimeout` ms, and calls `onIdle` and registered callbacks.
* By default, the IdleManager will log a user out after 10 minutes of inactivity.
* To override these defaults, you can pass an `onIdle` callback, or configure a custom `idleTimeout` in milliseconds
*/
export declare class IdleManager extends TimeoutManager {
constructor(options?: IdleManagerOptions);
}