Skip to content

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 ​

ParameterType
pathstring
optionsClassConsumerOptions

Returns ​

ClassDecorator

MIT licensed