UNPKG

@sv-use/core

Version:

A collection of Svelte 5 utilities.

27 lines (26 loc) 935 B
import { type ConfigurableWindow } from '../__internal__/configurable.js'; import type { CleanupFunction } from '../__internal__/types.js'; interface HasLeftPageOptions extends ConfigurableWindow { /** * Whether to automatically clean up the event listeners or not. * * If set to `true`, it must run in the component initialization lifecycle. * @default true */ autoCleanup?: boolean; } type HasLeftPageReturn = { readonly current: boolean; /** * Cleans up the event listeners. * @note Is called automatically if `options.autoCleanup` is set to `true`. */ cleanup: CleanupFunction; }; /** * Whether the mouse has left the page or not. * @param options Additional options to customize the behavior. * @see https://svelte-librarian.github.io/sv-use/docs/core/has-left-page */ export declare function hasLeftPage(options?: HasLeftPageOptions): HasLeftPageReturn; export {};