Skip to content

Commit

Permalink
fix: rm await for receive
Browse files Browse the repository at this point in the history
Signed-off-by: michael-0acf4 <[email protected]>
  • Loading branch information
michael-0acf4 authored Jan 28, 2025
1 parent a91fe40 commit e61f3db
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ query {

```typescript
// Workflow
const value = await ctx.receive<number>("myEvent"); // 1234
const value = ctx.receive<number>("myEvent"); // 1234
```

- **Ensure**

It's a function that takes a predicate, and will **interrupt** the workflow so that it will be replayed later if the returned value is false.

```typescript
const secret = await ctx.receive<string>("secret");
const secret = ctx.receive<string>("secret");
await ctx.ensure(() => secret == "top_secret");
//
// continue execution
Expand Down

0 comments on commit e61f3db

Please sign in to comment.