WorkloadAction type
Represents an action that can be handled by a specific workload. The shape of the action
depends on the iframeType:
- If
iframeTypeis'widget', thenwidgetTypemust be specified. - If
iframeTypeis omitted or has any value other than'widget', thenwidgetTypemust not be provided.
type WorkloadAction<TData> =
| (BaseWorkloadAction<TData> & {
iframeType: "widget"
widgetType: WidgetType
})
| (BaseWorkloadAction<TData> & {
iframeType?: Exclude<IFrameType, "widget">
widgetType?: never
})