GramIO API Reference / @gramio/composer/dist / MacroHooks
Interface: MacroHooks<TDerive>
Defined in: composer/index.d.ts:49
What a macro can return when activated
Type Parameters
| Type Parameter | Default type |
|---|---|
TDerive extends object | object |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
derive? | (ctx) => void | TDerive | Promise<void | TDerive> | Context enrichment — return type gets merged into the handler's context. Return void / undefined to stop the middleware chain (acts as a guard). | composer/index.d.ts:56 |
preHandler? | Middleware<any> | Middleware<any>[] | Middleware to run before the main handler | composer/index.d.ts:51 |