UNPKG

@ztimson/momentum

Version:

Client library for momentum

19 lines 852 B
import { PathEvent } from './core'; import { Momentum } from './momentum'; export declare class Permissions { protected momentum: Momentum; constructor(momentum: Momentum); /** Get all permissions */ all: () => string[]; /** Filter list of permissions to ones the user has */ filter: (...events: (string | PathEvent)[]) => PathEvent[]; /** Does user have any permissions (or) */ has: (...events: (string | PathEvent)[]) => boolean; /** Does user have all permissions (and) */ hasAll: (...events: (string | PathEvent)[]) => boolean; /** Raise error if user has no permissions (or) */ hasFatal: (...events: (string | PathEvent)[]) => void; /** Raise error if user missing any permissions (and) */ hasAllFatal: (...events: (string | PathEvent)[]) => void; } //# sourceMappingURL=permissions.d.ts.map