Skip to content

Commit cdb23cf

Browse files
committed
feat(core): MsgCallback is now typed as returning void | Promise<never> to indicate that they cannot contain await
Signed-off-by: Alberto Ricart <[email protected]>
1 parent 1971e42 commit cdb23cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: core/src/core.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ export type Status =
7777
| SlowConsumerStatus
7878
| ForceReconnectStatus;
7979

80-
export type MsgCallback<T> = (err: Error | null, msg: T) => void;
80+
export type MsgCallback<T> = (
81+
err: Error | null,
82+
msg: T,
83+
) => void | Promise<never>;
8184

8285
/**
8386
* Subscription Options

0 commit comments

Comments
 (0)