5.0.7 • Published 6 months ago

@types/throng v5.0.7

Weekly downloads
29,551
License
MIT
Repository
github
Last release
6 months ago

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.

5.0.6

7 months ago

5.0.5

8 months ago

5.0.7

6 months ago

5.0.4

2 years ago

5.0.3

3 years ago

5.0.2

3 years ago

5.0.1

3 years ago

5.0.0

3 years ago

4.0.2

6 years ago

4.0.1

7 years ago

4.0.0

7 years ago