Skip to content

Commit

Permalink
Replace .ofType with .build
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelCourtney committed Dec 4, 2023
1 parent 32ceacc commit c7437d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/scheduling/goals.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ ActivityExpression.ofType(ActivityTypes.ParamActivity);
In this case, all the activities of type `ParamActivity` will be matched (disregarding its parameters) and potentially used for satisfying the goal.

```ts
ActivityExpression.ofType(ActivityTypes.ParamActivity, { param: 1 });
ActivityExpression.build(ActivityTypes.ParamActivity, { param: 1 });
```

In this case, all the activities of type `ParamActivity` with parameter `param` equal to 1 will be matched and used for satisfying the goal.
In this case, all the activities of type `ParamActivity` with parameter `param` equal to 1 will be matched and used for satisfying the goal. To do this, you must use the `.build`
function instead of `.ofType`.

An optional `ActivityExpression` can be passed with the `activityFinder` parameter of goals. See below for examples of its use in goals.

Expand Down

0 comments on commit c7437d2

Please sign in to comment.