Skip to content

Commit

Permalink
Merge e8e6a9e into 0f03602
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnmcknight committed Oct 17, 2019
2 parents 0f03602 + e8e6a9e commit b693b91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,15 @@ declare namespace Moleculer {

type ServiceMethods = { [key: string]: ((...args: any[]) => any) } & ThisType<Service>;

type CallMiddlewareHandler = (actionName: string, params: any, opts: CallingOptions) => PromiseLike<any>;
type Middleware = {
[name: string]:
| ((handler: ActionHandler, action: Action) => any)
| ((handler: ActionHandler, event: ServiceEvent) => any)
| ((handler: ActionHandler) => any)
| ((service: Service) => any)
| ((broker: ServiceBroker) => any)
| ((handler: CallMiddlewareHandler) => CallMiddlewareHandler)
}

interface MiddlewareHandler {
Expand Down

0 comments on commit b693b91

Please sign in to comment.