UNPKG

@pnp/spfx-property-controls

Version:

Reusable property pane controls for SharePoint Framework solutions

17 lines 596 B
/** * Debounce function * * @param fnc Function to execute * @param time Time to wait until the function gets executed */ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type export const debounce = () => { let timeout; // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type return (fnc, time) => { const functionCall = (...args) => fnc.apply(this, args); // eslint-disable-line @typescript-eslint/no-explicit-any clearTimeout(timeout); timeout = setTimeout(functionCall, time); }; }; //# sourceMappingURL=Util.js.map