DefinitelyTyped/types/just-throttle/index.d.ts
Dominik Rowicki 6d7624e50f Create definition for just-throttle (#38707)
* Create definition for just-throttle

* Use more specific URL for the project

* Improve comments in tests slightly
2019-10-02 13:56:23 -07:00

11 lines
495 B
TypeScript

// Type definitions for just-throttle 1.1
// Project: https://github.com/angus-c/just/tree/master/packages/function-throttle
// Definitions by: Dominik Rowicki <https://github.com/papermana>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
declare function throttle(fn: (...args: unknown[]) => unknown, interval: number, callFirst?: false): () => void;
declare function throttle<T>(fn: T, interval: number, callFirst?: true): T;
export = throttle;