Merge pull request #1825 from strongloop/fix/listener-type
Add default generic arg value to `Listener` type
This commit is contained in:
commit
65a358656f
|
@ -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