Core
Framework v2.x
2

trigger #

Available since 2.8.0
Experimental: non-backward compatible changes or removal may occur in any future release.

Triggers an event.

If an internal event is triggered, the payload must be the same as the one usually expected.

Copied to clipboard!
trigger (event: string, ...payload): Promise<any>

Returns #

Returns a Promise resolving to the pipe chain result.

Usage #

Copied to clipboard!
await app.trigger('prometheus:start-metrics')