diff --git a/packages/feathers/index.d.ts b/packages/feathers/index.d.ts index 6972f5ae92..acadc628fe 100644 --- a/packages/feathers/index.d.ts +++ b/packages/feathers/index.d.ts @@ -54,7 +54,7 @@ declare namespace createApplication { } // tslint:disable-next-line void-return - type Hook> = (hook: HookContext) => (Promise | void> | HookContext | void); + type Hook> = (context: HookContext) => (Promise | void> | HookContext | void); interface HookContext> { /** diff --git a/packages/transport-commons/src/channels/mixins.ts b/packages/transport-commons/src/channels/mixins.ts index a69b115c33..7a5588ae29 100644 --- a/packages/transport-commons/src/channels/mixins.ts +++ b/packages/transport-commons/src/channels/mixins.ts @@ -62,7 +62,7 @@ export function channelMixin () { export type Event = string|(typeof ALL_EVENTS); -export type Publisher = (data: T, hook: HookContext) => Channel | Channel[] | void | Promise; +export type Publisher = (data: T, context: HookContext) => Channel | Channel[] | void | Promise; export interface PublishMixin { [PUBLISHERS]: { [ALL_EVENTS]?: Publisher, [key: string]: Publisher };