mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-23 17:22:43 +00:00
26 lines
805 B
TypeScript
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
|
|
}
|
|
}
|