Skip to content

Commit 6b50e42

Browse files
ffMathygismya
andcommitted
fix: bug in event typings after recent PR (ftrackhq#95)
Co-authored-by: Lars Johansson <[email protected]>
1 parent 5452365 commit 6b50e42

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

source/event_hub.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,17 @@ export interface UpdateEventPayload extends BaseEventPayload {
5959
data: UpdateEventData;
6060
}
6161

62-
export interface UnknownEventPayload extends BaseEventPayload {
63-
topic: unknown;
64-
data: unknown;
65-
}
66-
62+
/**
63+
* A union type of the different payload types with the
64+
* `topic:` property as a type discriminator.
65+
* Supports the topics `ftrack.action.discover`, `ftrack.action.launch`
66+
* and `ftrack.update`. Please add a GitHub issue for any missing core topics.
67+
* @interface EventPayload
68+
*/
6769
export type EventPayload =
6870
| ActionLaunchEventPayload
6971
| ActionDiscoverEventPayload
70-
| UpdateEventPayload
71-
| UnknownEventPayload;
72+
| UpdateEventPayload;
7273

7374
export interface EventSource {
7475
clientToken: string;

0 commit comments

Comments
 (0)