Skip to content

Commit 656e9fa

Browse files
Merge pull request #1619 from Tony133/docs/events
docs(events): added warning for event subscribers
2 parents 9fd2aeb + 6a412d3 commit 656e9fa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/techniques/events.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ handleOrderCreatedEvent(payload: OrderCreatedEvent) {
8383
}
8484
```
8585

86+
> warning **Warning** Event subscribers cannot be request-scoped.
87+
8688
The first argument can be a `string` or `symbol` for a simple event emitter and a `string | symbol | Array<string | symbol>` in a case of a wildcard emitter. The second argument (optional) is a listener options object ([read more](https://github.com/EventEmitter2/EventEmitter2#emitteronevent-listener-options-objectboolean)).
8789

8890
```typescript

0 commit comments

Comments
 (0)