UNPKG

@selenite/commons

Version:

This typescript package provides a set of frequently used utilities, types and svelte actions for building projects with Typescript and Svelte.

12 lines (11 loc) 445 B
import type { Action } from 'svelte/action'; export type DocumentParams = { [key in keyof DocumentEventMap]?: (event: DocumentEventMap[key]) => void; } & AddEventListenerOptions; /** * Action to listen to events on the document. * @param node node the action is bound to * @param params the listeners and the listeners options combined * @returns svelte action */ export declare const documentListener: Action<Element, DocumentParams>;