UNPKG

@villedemontreal/workit

Version:

Worker for Node.js system with pluggable clients that works with both AWS Step function and Camunda platform powered by TypeScript

12 lines (11 loc) 497 B
import { IClient, IMessage } from '@villedemontreal/workit-types'; import 'reflect-metadata'; export declare class Client<TClient extends IClient> { protected _onMessageReceived: (message: IMessage, service: unknown) => Promise<void>; protected readonly _client: TClient; constructor(client: TClient); subscribe(handler: (message: IMessage, service: unknown) => Promise<void>): Promise<void>; unsubscribe(): Promise<void>; private _execute; private _startSubscriber; }