This commit is contained in:
Eric Amodio
2016-11-03 03:09:33 -04:00
parent 8df6b80725
commit 409be335f9
38 changed files with 1094 additions and 520 deletions

14
src/system/function.ts Normal file
View File

@@ -0,0 +1,14 @@
'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);
}
}