Skip to content

Type Alias: RbacSnapshotSource ​

ts
type RbacSnapshotSource = 
  | RbacSnapshot
  | null
  | undefined
  | (() => RbacSnapshot | null | undefined);

Defined in: packages/sveltekit/src/context.svelte.ts:18

The snapshot to check against: the value itself, or a getter such as () => data.rbac. With a getter, every check re-runs when the data changes (e.g. after invalidateAll() on login or logout).

Released under the MIT License. Inspired by spatie/laravel-permission.