/** * @slynova/fence * * @license MIT * @copyright Slynova - Romain Lanz */ import { TResource } from '../Contracts'; declare class Bouncer { /** * Gate to test. */ private $gate; /** * User to test. */ private readonly $user; /** * Constructor. * * @param user User to test */ constructor(user: Function | object | undefined | null); /** * Call the given policy method. * * @param ability Ability to test * @param resource Resource to test */ callPolicy(ability: string, resource: TResource): boolean; /** * Verifies the given gate for the given resource. * * @param resource Resource to test */ for(resource: TResource): boolean; /** * Registers the gate name. * * @param gate Gate to test */ pass(gate: string): this; } export { Bouncer };