Skip to content

Allow returning Optional<Tuple> from @React handlers #1218

@yuri-sergiichuk

Description

@yuri-sergiichuk

Currently, from event reactor method we can return:

  1. EventMessage
  2. Optional<EventMessage>
  3. Iterable<EventMessage>
  4. EitherOf<...>

But, to express that we want to return a pair (or triplet, or ...) of events or nothing we have now the following options:

  1. Triplet<EventMessage,EventMessage,Nothing>
  2. Iterable<EventMessage> where iterable is empty when no events are emitted

The best way to express this, from my standpoint, is to have an Optional<Pair<EventMessage, EventMessage>> that is not supported by the framework now.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions