/** * Wrapper for safely calling the callback function. * * Useful for calling event handlers that may be 'undefined'. * The main reason for using this function is to reduce the number of branches in the code, * and reduce the number of tests to cover. */ declare type ArgumentTypes = F extends (...args: infer A) => any ? A : never; export declare type SafeInvoke = (fn?: F, ...args: ArgumentTypes) => void; export declare const safeInvoke: SafeInvoke; export {};