Type alias PropagatedEvent<Topic, Event>

PropagatedEvent<Topic, Event>: Event extends infer E extends {
    type: string;
} ? Omit<E, "type"> & {
    type: PropagatedEventType<Topic, E["type"]>;
} : never

Modifies an event shape to reflect propagation to a parent topic. The 'type' field is prefixed with the original topic, and a new property is added with the original topic's identity.

Type Parameters

  • Topic extends string

  • Event extends {
        type: string;
    }

Generated using TypeDoc