casbin
Version:
An authorization library that supports access control models like ACL, RBAC, ABAC in Node.JS
12 lines (11 loc) • 411 B
TypeScript
export type MatchingFunction = (...arg: any[]) => boolean | number | string | Promise<boolean> | Promise<number> | Promise<string>;
export declare class FunctionMap {
private functions;
/**
* constructor is the constructor for FunctionMap.
*/
constructor();
static loadFunctionMap(): FunctionMap;
addFunction(name: string, func: MatchingFunction): void;
getFunctions(): any;
}