onStartTyping
Category Sensors
Fires when users start typing on non-editable elements.
Demo
Usage
Type definitions
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/sensors/on-start-typing
*/
export declare function onStartTyping(callback: (event: KeyboardEvent) => void, options?: OnStartTypingOptions): CleanupFunction;
export {};