@types/flushable
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/flushable

Weekly Downloads

142

Version

1.0.4

License

MIT

Unpacked Size

3.64 kB

Total Files

5

Last publish

Collaborators

  • types