UNPKG

routing-controllers

Version:

Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage for Express / Koa using TypeScript.

7 lines (6 loc) 300 B
import { Action } from './Action'; /** * Special function used to check user authorization roles per request. * Must return true or promise with boolean true resolved for authorization to succeed. */ export type AuthorizationChecker = (action: Action, roles: any[]) => Promise<boolean> | boolean;