E5EE docs(typescript): fix misleading parameter name by Gabrola · Pull Request #2106 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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