Skip to content

Commit

Permalink
chore: improve Listener signature
Browse files Browse the repository at this point in the history
Improved Listener signature so it can accept callback or promise.
  • Loading branch information
Hage Yaapa authored and hacksparrow committed Mar 5, 2020
1 parent a50b3db commit 2946c5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/observer-mixin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand Down

0 comments on commit 2946c5b

Please sign in to comment.