Add default generic arg value to `Listener` type
The changes introduced by dcfda58
may break existing consumers
of our typings. This commit fixes this problem by adding a default
value to the recently introduced generic argument of `Listener` type.
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
This commit is contained in:
parent
dcfda58fda
commit
92654f646b
|
@ -19,7 +19,9 @@ export interface OperationHookContext<T extends typeof PersistedModel> {
|
|||
[property: string]: any;
|
||||
}
|
||||
|
||||
export type Listener<Ctx> = (ctx: Ctx, next: (err?: any) => void) => void;
|
||||
export type Listener<Ctx = OperationHookContext<PersistedModelClass>> = (
|
||||
ctx: Ctx, next: (err?: any) => void
|
||||
) => void;
|
||||
|
||||
export interface ObserverMixin {
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue