make EventParams typed for tidier event handling
Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-events-node': patch
|
||||
---
|
||||
|
||||
Make `EventParams` typed for implementing tidier event handling.
|
||||
@@ -17,7 +17,7 @@
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface EventParams {
|
||||
export interface EventParams<PayloadType = unknown> {
|
||||
/**
|
||||
* Topic for which this event should be published.
|
||||
*/
|
||||
@@ -25,7 +25,7 @@ export interface EventParams {
|
||||
/**
|
||||
* Event payload.
|
||||
*/
|
||||
eventPayload: unknown;
|
||||
eventPayload: PayloadType;
|
||||
/**
|
||||
* Metadata (e.g., HTTP headers and similar for events received from external).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user