@adyen/kyc-components
Version:
This guide assumes that you have already an account with Adyen. A legalEntity needs to be created, and you need to have a `legalEntityId` to instatiate a Component.
21 lines (20 loc) • 958 B
TypeScript
type VoidFunction = (...args: any) => void;
/**
* Returns a function that will only execute after no further calls have been made for a given time.
*
* **Note: functions returned by this are not suitable for use in components! For that, see {@link useDebouncedCallback}**.
*
* @param func the function to execute
* @param wait the time to wait, in milliseconds
*/
export declare const debounce: <F extends VoidFunction>(func: F, wait: number) => (...args: Parameters<F>) => void;
/**
* Returns a memoized function that will only execute after no further calls have been made for a given time.
*
* Callbacks returned by this method *are* safe to use within components, as their reference will be guaranteed stable.
*
* @param func the function to execute
* @param wait the time to wait, in milliseconds
*/
export declare const useDebouncedCallback: <F extends VoidFunction>(func: F, wait: number) => (...args: Parameters<F>) => void;
export {};