AboutSupportDeveloper GuideVersion 34.118.78.89

Type alias PropagatedEvent<SourceTopic, TargetTopic, Event>

PropagatedEvent<SourceTopic, TargetTopic, Event>: Event extends infer E extends {
        type: string;
    }
    ? E["type"] extends "close-requested"
        ? never
        : Omit<E, "type" | "topic"> & {
            topic: TargetTopic;
            type: OpenFin.Events.BaseEvents.PropagatedEventType<SourceTopic, E["type"]>;
        }
    : never

Modifies an event shape to reflect propagation to a parent topic. Excludes close-requested events, as these do not propagate.

Type Parameters

  • SourceTopic extends string

    The topic the event shape is propagating from.

  • TargetTopic extends string

    The topic the event shape is propagating to.

  • Event extends {
        type: string;
    }

    The shape of the event being propagated.

Remarks

The 'type' field is prefixed with the original topic, and a new property is added with the original topic's identity.