UNPKG

@eccenca/gui-elements

Version:

GUI elements based on other libraries, usable in React application, written in Typescript.

15 lines 502 B
import { debounce } from "lodash"; var DEBOUNCE_TIME = 500; export var debouncedLinter = function (lintFunction, time) { if (time === void 0) { time = DEBOUNCE_TIME; } var debouncedFn = debounce(function (view, resolve) { var diagnostics = lintFunction(view); resolve(diagnostics); }, time); return function (view) { return new Promise(function (resolve) { debouncedFn(view, resolve); }); }; }; //# sourceMappingURL=debouncedLinter.js.map