Skip to content

Interface: ThrottleClock ​

Experimental

Minimal clock abstraction so createThrottle is testable with fake timers.

Methods ​

clearTimeout() ​

ts
clearTimeout(handle): void;

Experimental

Parameters ​

ParameterType
handleunknown

Returns ​

void


now() ​

ts
now(): number;

Experimental

Returns ​

number


setTimeout() ​

ts
setTimeout(fn, ms): unknown;

Experimental

Parameters ​

ParameterType
fn() => void
msnumber

Returns ​

unknown

Released under the MIT License.