Skip to content

Commit

Permalink
Document subscribe as a teminal operator (#5419)
Browse files Browse the repository at this point in the history

Signed-off-by: Ben Sherman <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
Co-authored-by: Paolo Di Tommaso <[email protected]>
Co-authored-by: Christopher Hakkaart <[email protected]>
  • Loading branch information
3 people authored Oct 22, 2024
1 parent d6c684b commit 24d595c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/reference/operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ See also: [countLines](#countlines)

## subscribe

*Returns: the source channel*
*Returns: nothing*

The `subscribe` operator invokes a custom function for each item from a source channel:

Expand Down Expand Up @@ -1425,6 +1425,10 @@ The `subscribe` operator supports multiple types of event handlers:
:language: console
```

:::{note}
Unlike most operators, `subscribe` is a *terminal operator* and does not emit any values. It should only be used for *side effects*, such as printing to the console, writing to a file, or making HTTP requests.
:::

Available options:

`onNext`
Expand Down

0 comments on commit 24d595c

Please sign in to comment.