import { AnyAbility } from './PureAbility'; import { Normalize } from './types'; import { Generics } from './RuleIndex'; export type GetErrorMessage = (error: ForbiddenError) => string; /** @deprecated will be removed in the next major release */ export declare const getDefaultErrorMessage: GetErrorMessage; declare const NativeError: new (message: string) => Error; export declare class ForbiddenError extends NativeError { readonly ability: T; action: Normalize['abilities']>[0]; subject: Generics['abilities'][1]; field?: string; subjectType: string; static _defaultErrorMessage: GetErrorMessage; static setDefaultMessage(messageOrFn: string | GetErrorMessage): void; static from(ability: U): ForbiddenError; constructor(ability: T); setMessage(message: string): this; throwUnlessCan(...args: Parameters): void; unlessCan(...args: Parameters): this | undefined; } export {};