Merge pull request #1825 from strongloop/fix/listener-type

Add default generic arg value to `Listener` type
This commit is contained in:
Miroslav Bajtoš 2020-03-02 11:49:18 +01:00 committed by GitHub
commit 65a358656f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

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