io.sendEvent jsdocs

This commit is contained in:
Matt Aitken
2023-07-03 19:19:56 +01:00
parent 86dbd5d1dc
commit 8e147dbe0c
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@trigger.dev/sdk": patch
---
io.sendEvent jsdocs
+5
View File
@@ -187,6 +187,11 @@ export class IO {
)) as TResponseData; )) as TResponseData;
} }
/** `io.sendEvent()` allows you to send an event from inside a Job run. The sent even will trigger any Jobs that are listening for that event (based on the name).
* @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information.
* @param event The event to send. The event name must match the name of the event that your Jobs are listening for.
* @param options Options for sending the event.
*/
async sendEvent( async sendEvent(
key: string | any[], key: string | any[],
event: SendEvent, event: SendEvent,