Files
vscode-gitlens/src/system/function.ts
Eric Amodio 409be335f9 1.0 wip
2016-11-03 03:09:33 -04:00

14 lines
367 B
TypeScript

'use strict';
// import { debounce as _debounce } from 'lodash';
const _debounce = require('lodash.debounce');
export interface IDeferred {
cancel(): void;
flush(): void;
}
export namespace Functions {
export function debounce<T extends Function>(fn: T, wait?: number, options?: any): T & IDeferred {
return _debounce(fn, wait, options);
}
}