@sv-use/core
Version:
A collection of Svelte 5 utilities.
20 lines (19 loc) • 849 B
TypeScript
import { type ConfigurableDocument } from '../__internal__/configurable.js';
import type { CleanupFunction } from '../__internal__/types.js';
interface OnStartTypingOptions extends ConfigurableDocument {
/**
* Whether to auto-cleanup the event listener or not.
*
* If set to `true`, it must run in the component initialization lifecycle.
* @default true
*/
autoCleanup?: boolean;
}
/**
* Fires when users start typing on non-editable elements.
* @param callback The callback for when users start typing on non-editable elements.
* @param options Additional options to customize the behavior.
* @see https://svelte-librarian.github.io/sv-use/docs/core/on-start-typing
*/
export declare function onStartTyping(callback: (event: KeyboardEvent) => void, options?: OnStartTypingOptions): CleanupFunction;
export {};