mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-13 17:23:11 -05:00
14 lines
367 B
TypeScript
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);
|
|
}
|
|
} |