chore: improve Listener signature
Improved Listener signature so it can accept callback or promise.
This commit is contained in:
parent
a50b3db6e9
commit
2946c5b489
|
@ -21,7 +21,7 @@ export interface OperationHookContext<T extends typeof ModelBase> {
|
|||
|
||||
export type Listener<Ctx = OperationHookContext<typeof ModelBase>> = (
|
||||
ctx: Ctx, next: (err?: any) => void
|
||||
) => void;
|
||||
) => PromiseOrVoid<void>;
|
||||
|
||||
export interface ObserverMixin {
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue