@types/blocked
Version:
TypeScript definitions for blocked
40 lines (30 loc) • 1.26 kB
Markdown
# Installation
> `npm install --save @types/blocked`
# Summary
This package contains type definitions for blocked (https://github.com/visionmedia/node-blocked#readme).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/blocked.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/blocked/index.d.ts)
````ts
/// <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 | undefined; // in milliseconds
interval?: number | undefined; // in milliseconds
}
}
````
### Additional Details
* Last updated: Mon, 06 Nov 2023 22:41:04 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
# Credits
These definitions were written by [Jonas Lochmann](https://github.com/l-jonas).