Skip to content

Commit

Permalink
docs: change hint line
Browse files Browse the repository at this point in the history
  • Loading branch information
koreanddinghwan authored Oct 18, 2023
1 parent ec846c7 commit f61b56c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions content/techniques/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,15 @@ export type OnEventOptions = OnOptions & {
};
```

> info **Hint** Read more about the [`OnOptions` options object from `eventemitter2`](https://github.com/EventEmitter2/EventEmitter2#emitteronevent-listener-options-objectboolean).
```typescript
@OnEvent('order.created', { async: true })
handleOrderCreatedEvent(payload: OrderCreatedEvent) {
// handle and process "OrderCreatedEvent" event
}
```

> info **Hint** read more about the [`OnOptions` options object from `eventemitter2`](https://github.com/EventEmitter2/EventEmitter2#emitteronevent-listener-options-objectboolean).

To use namespaces/wildcards, pass the `wildcard` option into the `EventEmitterModule#forRoot()` method. When namespaces/wildcards are enabled, events can either be strings (`foo.bar`) separated by a delimiter or arrays (`['foo', 'bar']`). The delimiter is also configurable as a configuration property (`delimiter`). With namespaces feature enabled, you can subscribe to events using a wildcard:

```typescript
Expand Down

0 comments on commit f61b56c

Please sign in to comment.