UNPKG

svelte-event

Version:

svelte-event provides a set of wrapper functions for adding modifiers to event handlers and a versatile `event` action for comprehensive event listener management in Svelte.

12 lines (11 loc) 380 B
import type { EventHandler } from './types'; /** Composes multiple event handlers into a single handler * @example * ```ts * const handler = compose( * (event) => console.log('first handler', event), * (event) => console.log('second handler', event), * ); * ``` */ export declare function compose<const T extends Event>(...handlers: EventHandler<T>[]): EventHandler<T>;