Skip to content

Commit 4325e1a

Browse files
Maxim Ciuchitumciuchitu
Maxim Ciuchitu
authored andcommittedNov 10, 2021
docs(migration-guide): add pubsub event handler decorator in the examples
1 parent 3c0448e commit 4325e1a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎docs/guides/MIGRATION_2.md

+2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export class MyPubsubEvent extends AbstractPubsubEvent<IMyPubsubEvent> {}
8989
Before:
9090

9191
```typescript
92+
@PubsubEventHandler(MyPubsubEvent)
9293
export class MyPubsubEventHandler extends PubsubHandler implements IEventHandler<MyPubsubEvent> {
9394
exchange: () => "my_exchange";
9495

@@ -101,6 +102,7 @@ export class MyPubsubEventHandler extends PubsubHandler implements IEventHandler
101102
Now:
102103

103104
```typescript
105+
@PubsubEventHandler(MyPubsubEvent)
104106
export class MyPubsubEventHandler extends AbstractPubsubHandler<MyPubsubEvent> {
105107
async handle(event: MyPubsubEvent): Promise<void> {
106108
const payload: IMyPubsubEvent = event.payload;

0 commit comments

Comments
 (0)