Skip to content

Commit

Permalink
refactor: simplify implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
riflowth committed Apr 30, 2022
1 parent c79664e commit dca1209
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ export abstract class Middleware {
* @param routeMetadata - A route metadata
*/
abstract getHandler(routeMetadata: RouteMetadata): Promise<RouteHandler>;
getRegisterCondition(): MiddlewareCondition;
getRegisterCondition(routeMethod: Methods, routeMetadata: RouteMetadata): boolean;
}

export type MiddlewareCondition = (routeMethod: Methods, routeMetadata: RouteMetadata) => boolean;

export class ControllerRegistry {
constructor(app: Express);
/**
Expand Down

0 comments on commit dca1209

Please sign in to comment.