import { IDecorator } from "oly"; export declare class AuthDecorator implements IDecorator { private roles; constructor(roles?: string | string[]); asMethod(target: object, propertyKey: string, i: TypedPropertyDescriptor): void; } /** * Sugar of @use + hasRole(...roles) middleware. * * ```ts * * class Api { * * @auth // check only auth * @get("/") * authOnly() {} * * @auth("ADMIN") // check data.roles[] * @get("/admin") * adminOnly() {} * } * ``` */ export declare const auth: ((data?: string | string[] | undefined, p?: string | undefined, i?: number | undefined) => (data?: object | Function | undefined, p?: string | undefined, i?: number | TypedPropertyDescriptor | undefined) => any) & ((data?: object | Function | undefined, p?: string | undefined, i?: number | TypedPropertyDescriptor | undefined) => any);