Skip to content

index.Variable.Actions

github-actions[bot] edited this page Nov 30, 2026 · 26 revisions

Variable: Actions

const Actions: {
  create: "create";
  delete: "delete";
  manage: "manage";
  read: "read";
  update: "update";
};

Defined in: packages/graphql-casl/src/ability.ts:21

Const object holding every Action value — use instead of raw strings in can/cannot calls and rule definitions to get autocomplete and catch typos at compile time.

Type Declaration

create

readonly create: "create" = 'create';

delete

readonly delete: "delete" = 'delete';

manage

readonly manage: "manage" = 'manage';

read

readonly read: "read" = 'read';

update

readonly update: "update" = 'update';

Remarks

The satisfies clause validates full coverage: TypeScript errors if Action gains a new value and this object is not updated.

API Reference

Clone this wiki locally