@adonisjs/route-model-binding
Version:
Route model binding for AdonisJS
17 lines (16 loc) • 504 B
TypeScript
import type { ApplicationService } from '@adonisjs/core/types';
import type { HttpContext } from '@adonisjs/core/http';
import type { NextFn } from '@adonisjs/core/types/http';
/**
* HttpContext augmentations
*/
declare module '@adonisjs/core/http' {
interface HttpContext {
resources: Record<string, any>;
}
}
export default class RouteModelBindingMiddleware {
#private;
constructor(application: ApplicationService);
handle(ctx: HttpContext, next: NextFn): Promise<any>;
}