Skip to content

Type Alias: GuardHandler<C> ​

ts
type GuardHandler<C> = (ctx, context) => unknown;

Defined in: packages/elysia/src/guards.ts:48

Returns the response to send (any value Elysia can send: a Response, an object, a string), or throws (e.g. Elysia's status(403) / an error()).

Type Parameters ​

Type ParameterDefault type
CGuardHandlerContext

Parameters ​

ParameterType
ctxC
contextGuardContext

Returns ​

unknown

Released under the MIT License. Inspired by spatie/laravel-permission.