DefinitelyTyped/types/blocked/index.d.ts
millerick f1cf1c35fc Updated and fixed types for blocked package (#40831)
* Updated types for blocked

* update version

* lint
2019-12-05 21:39:51 -08:00

26 lines
805 B
TypeScript

// Type definitions for blocked 1.3
// Project: https://github.com/visionmedia/node-blocked#readme
// Definitions by: Jonas Lochmann <https://github.com/l-jonas>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
/*~ Note that ES6 modules cannot directly export callable functions.
*~ This file should be imported using the CommonJS-style:
*~ import x = require('someLibrary');
*~
*~ Refer to the documentation to understand common
*~ workarounds for this limitation of ES6 modules.
*/
export = Blocked;
declare function Blocked(callback: (ms: number) => void, options?: Blocked.Options): NodeJS.Timer;
declare namespace Blocked {
interface Options {
threshold?: number; // in milliseconds
interval?: number; // in milliseconds
}
}