Skip to content
Français

PermissionDecision

import type { PermissionDecision } from "@elie-laloum/outpost";

The fields below cover all variants; the signature specifies their allowed combinations.

  • allowedRequired
    true | false
    Whether the call may run.
  • reasonVariant-dependent
    string
    Why the call was denied.
export type PermissionDecision =
  | {
      readonly allowed: true;
    }
  | {
      readonly allowed: false;
      readonly reason: string;
    };