UNPKG

453 BTypeScriptView Raw
1import { EventHandlers } from './types';
2/**
3 * Extracts event handlers from a given object.
4 * A prop is considered an event handler if it is a function and its name starts with `on`.
5 *
6 * @param object An object to extract event handlers from.
7 * @param excludeKeys An array of keys to exclude from the returned object.
8 */
9export default function extractEventHandlers(object: Record<string, any> | undefined, excludeKeys?: string[]): EventHandlers;