UNPKG

node-universe

Version:

基于 Nodejs 环境的一款微服务框架,原理来自于宇宙中的恒星,行星,卫星等系统。

18 lines (17 loc) 699 B
import { GenericObject } from '../../typings'; import Star from '../star'; import { Middleware } from '../../typings/middleware'; export default class MiddlewareHandler { star: Star; list: Array<Middleware>; registeredHooks: GenericObject; constructor(star: Star); add(middleware: any): void; wrapHandler(method: string, handler: Function, def: Object): Function; callHandlers(method: string, args: Array<any>, options: GenericObject): any; callSyncHandlers(method: string, args: Array<any>, options?: { reverse?: boolean; }): any; count(): number; wrapMethod(method: string, handler: Function, bindTo?: any, options?: GenericObject): Function; }