X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fworker.ts;h=562b21477e31dd1aaa603a087eb33d3c92b4b130;hb=d91ef6685aaf16be9a99c9ccec1bf0b2b6d085dc;hp=143bdab127dbfb334f5545518c1a160c1683dc47;hpb=78cea37e264d5ca527bc42eb056f3b9579a2b2c4;p=poolifier.git diff --git a/examples/typescript/worker.ts b/examples/typescript/worker.ts index 143bdab1..562b2147 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 { @@ -11,10 +11,8 @@ export interface MyResponse { class MyThreadWorker extends ThreadWorker> { constructor () { - // eslint-disable-next-line @typescript-eslint/promise-function-async - super((data: MyData) => this.process(data), { - maxInactiveTime: 60000, - async: true + super(async (data: MyData) => await this.process(data), { + maxInactiveTime: 60000 }) }