5.0.7 • Published 6 months ago
@types/throng v5.0.7
Installation
npm install --save @types/throng
Summary
This package contains type definitions for throng (https://github.com/hunterloftis/throng).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/throng.
index.d.ts
// Type definitions for throng 5.0
// Project: https://github.com/hunterloftis/throng
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>
// Tate Thurston <https://github.com/tatethurston>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function throng(startOrOptions: throng.WorkerCallback | throng.Options): Promise<void>;
declare function throng(workers: throng.WorkerCount, start: throng.WorkerCallback): Promise<void>;
declare namespace throng {
type WorkerCount = number | string;
type WorkerCallback = (id: number, disconnect: () => void) => void;
type MasterCallback = () => void;
type Options = {
signals?: string[] | undefined;
grace?: number | undefined;
lifetime?: number | undefined;
master?: MasterCallback | undefined;
count?: number | undefined;
workers?: WorkerCount | undefined;
} & ({start: WorkerCallback} | {worker: WorkerCallback});
}
export = throng;
export as namespace throng;
Additional Details
- Last updated: Mon, 18 Oct 2021 13:31:21 GMT
- Dependencies: none
- Global values:
throng
Credits
These definitions were written by Cyril Schumacher, and Tate Thurston.