Skip to content

Provide array of results to event handler context #50

@Raiondesu

Description

@Raiondesu

Is your feature request related to a problem? Please describe.
Current way of result handling in emitters and handlers is half-baked - handlers can return data to emitters, but they do not have any knowledge or control on how this data is processed or handled.

Describe the solution you'd like
Provide a new property to the event context - a typed results array that contains all the results of all previous handler's execution.

Example

on(someMap)('someEvent')(ctx => {
	const isMyHandlerFirst = ctx.results.length === 0;
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions