API reference / @chanx-js/server / core / Consumer
Function: Consumer()
ts
function Consumer(path, options): ClassDecorator;Defined in: packages/server/src/classes.ts:163
Declare a class as a consumer on a route; its @On and @OnEvent methods are its handlers.
Parameters
| Parameter | Type |
|---|---|
path | string |
options | ClassConsumerOptions |
Returns
ClassDecorator