Type alias PropagatedEvent<Topic, Event>
Propagated
Event
<Topic, Event>: Event extends infer E
extends { type
: string; } ? Omit<E, "type"> & { type
: PropagatedEventType<Topic, E["type"]>; } : never
Type Parameters
-
Topic extends string
-
Event extends {
type: string;
}
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.