chore: improve Listener signature

Improved Listener signature so it can accept callback or promise.
This commit is contained in:
Hage Yaapa 2020-03-03 20:09:34 +05:30 committed by Hage Yaapa
parent a50b3db6e9
commit 2946c5b489
1 changed files with 1 additions and 1 deletions

View File

@ -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 {
/**