permix
Version:
Permix is a lightweight, framework-agnostic, type-safe permissions management library for JavaScript applications on the client and server sides.
17 lines (14 loc) • 1.01 kB
TypeScript
import { P as PermixDefinition, a as Permix, b as PermixStateJSON } from '../shared/permix.CuefdCK4.js';
export { C as CheckContext, f as CheckFunctionObject, h as CheckFunctionParams, e as PermixRules, c as checkWithRules, d as createPermix, g as getRules } from '../shared/permix.CuefdCK4.js';
export { M as MaybePromise, i as isRulesValid } from '../shared/permix.BDsgFWDK.js';
type DehydratedState<Permissions extends PermixDefinition> = PermixStateJSON<Permissions>;
/**
* @deprecated Use `permix.dehydrate()` and `permix.hydrate(state)` directly instead.
*/
declare function dehydrate<Permissions extends PermixDefinition>(permix: Permix<Permissions>): PermixStateJSON<Permissions>;
/**
* @deprecated Use `permix.dehydrate()` and `permix.hydrate(state)` directly instead.
*/
declare function hydrate<Permissions extends PermixDefinition>(permix: Permix<Permissions>, state: DehydratedState<Permissions>): void;
export { Permix, PermixDefinition, dehydrate, hydrate };
export type { DehydratedState };