UNPKG

363 BTypeScriptView Raw
1/**
2 * Removes event handlers from the given object.
3 * A field is considered an event handler if it is a function with a name beginning with `on`.
4 *
5 * @param object Object to remove event handlers from.
6 * @returns Object with event handlers removed.
7 */
8export default function omitEventHandlers<T extends Record<string, unknown>>(object: T | undefined): {};