Installation
npm install --save @types/flushable
Summary
This package contains type definitions for flushable (https://github.com/petegleeson/flushable#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/flushable.
index.d.ts
declare namespace flushable {
type FlushableOnCompleteHandler = (flushed: boolean) => any;
interface FlushableOperation {
/** Returns whether or not the callback has been executed */
pending: () => boolean;
/** Stops the callback from being executed */
cancel: () => void;
/** Immediately executes the callback */
flush: () => void;
}
}
export = flushable;
declare function flushable(
onComplete: flushable.FlushableOnCompleteHandler,
delay: number,
): flushable.FlushableOperation;
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: none
Credits
These definitions were written by Parth Mehta.