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
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: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: none
Credits
These definitions were written by Cyril Schumacher.