Files
DefinitelyTyped/types/throng/throng-tests.ts
Cyril Schumacher 031d1a1b33 Add definition for "throng" (#16123)
* Add definition for "throng".

* Fix tslint errors.

* Fix mistakes.

* Fix mistake.

* Replace "class" by "interface".
2017-04-25 09:50:25 -07:00

31 lines
489 B
TypeScript

import throng = require("throng");
function masterFunction() { }
function startFunction(id: number) { }
throng((id: number) => {});
throng(startFunction);
throng(3, startFunction);
throng({
workers: 4,
master: masterFunction,
start: startFunction
});
throng({
workers: 16,
grace: 1000,
master: masterFunction,
start: startFunction
});
throng({
workers: 4,
lifetime: 10000,
grace: 4000,
master: masterFunction,
start: startFunction
});