UNPKG

@pnp/spfx-property-controls

Version:

Reusable property pane controls for SharePoint Framework solutions

21 lines 722 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.debounce = void 0; /** * 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 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); }; }; exports.debounce = debounce; //# sourceMappingURL=Util.js.map