X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fworker.ts;h=81d39df3c9eb5c34019dfeeca6e2ab495f6fc982;hb=9c69b8134a84322cb2c2d3866ebcb34911824b3f;hp=143bdab127dbfb334f5545518c1a160c1683dc47;hpb=78cea37e264d5ca527bc42eb056f3b9579a2b2c4;p=poolifier.git diff --git a/examples/typescript/worker.ts b/examples/typescript/worker.ts index 143bdab1..81d39df3 100644 --- a/examples/typescript/worker.ts +++ b/examples/typescript/worker.ts @@ -1,7 +1,7 @@ import { ThreadWorker } from 'poolifier' export interface MyData { - ok: number + ok: 0 | 1 } export interface MyResponse { @@ -13,8 +13,7 @@ class MyThreadWorker extends ThreadWorker> { constructor () { // eslint-disable-next-line @typescript-eslint/promise-function-async super((data: MyData) => this.process(data), { - maxInactiveTime: 60000, - async: true + maxInactiveTime: 60000 }) }