Skip to content

Commit

Permalink
docs(typescript): fix misleading param name (#2106)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabrola committed Nov 8, 2020
1 parent cd9ef44 commit 2f91398
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/feathers/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ declare namespace createApplication {
}

// tslint:disable-next-line void-return
type Hook<T = any, S = Service<T>> = (hook: HookContext<T, S>) => (Promise<HookContext<T, S> | void> | HookContext<T, S> | void);
type Hook<T = any, S = Service<T>> = (context: HookContext<T, S>) => (Promise<HookContext<T, S> | void> | HookContext<T, S> | void);

interface HookContext<T = any, S = Service<T>> {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/transport-commons/src/channels/mixins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function channelMixin () {

export type Event = string|(typeof ALL_EVENTS);

export type Publisher<T = any> = (data: T, hook: HookContext<T>) => Channel | Channel[] | void | Promise<Channel | Channel[] | void>;
export type Publisher<T = any> = (data: T, context: HookContext<T>) => Channel | Channel[] | void | Promise<Channel | Channel[] | void>;

export interface PublishMixin<T = any> {
[PUBLISHERS]: { [ALL_EVENTS]?: Publisher<T>, [key: string]: Publisher<T> };
Expand Down

0 comments on commit 2f91398

Please sign in to comment.