import { ExecutionContext } from "@nestjs/common"; import { User } from "../entities/user/user.model"; type CurrentUserDecoratorOptions = { nullable?: boolean; }; export declare const decoratorFunction: (options: CurrentUserDecoratorOptions | undefined, context: ExecutionContext) => User | null; /** * Inject authenticated user into method argument. * * Accepts an optional `options` configuration object to allow a missing user. * If `options.nullable` is set to `true`, this decorator will return `null` for * a missing user. Otherwise throws HTTP 401. * * ### Examples: * * ```ts * @Get("hello") * async hello(@CurrentUser() user: User) { * // Will throw if user is not found. * } * ``` * * ```ts * @Get("hello") * async hello(@CurrentUser({ nullable: true }) user: User | null) { * // `user` is `null` if not authenticated or not found. No error is thrown. * } * ``` * * @returns `User | null` * @group Decorators */ export declare const CurrentUser: (...dataOrPipes: (import("@nestjs/common").PipeTransform | import("@nestjs/common").Type> | CurrentUserDecoratorOptions)[]) => ParameterDecorator; export {};