You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> warning **Warning** Event subscribers cannot be request-scoped.
87
87
88
-
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)).
88
+
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.
89
+
90
+
The second argument (optional) is a listener options object as follows:
91
+
92
+
93
+
```typescript
94
+
exporttypeOnEventOptions=OnOptions& {
95
+
/**
96
+
* If "true", prepends (instead of append) the given listener to the array of listeners.
* If "true", the onEvent callback will not throw an error while handling the event. Otherwise, if "false" it will throw an error.
106
+
*
107
+
* @defaulttrue
108
+
*/
109
+
suppressErrors?:boolean;
110
+
};
111
+
```
112
+
113
+
> info **Hint** Read more about the `OnOptions` options object from [`eventemitter2`](https://github.com/EventEmitter2/EventEmitter2#emitteronevent-listener-options-objectboolean).
0 commit comments