Replies: 1 comment
-
You can't use it like this because const rule = { action: 'read', subject: 'User' } satisfies RawRuleOf<AppAbility> ;
ability.can(rule.action, rule.subject); or for older TS versions: const rule = { action: 'read', subject: 'User' } as const;
ability.can(rule.action, rule.subject); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Getting TS error:
for ability.can(...) function.
What is the correct rule to be used here?
Beta Was this translation helpful? Give feedback.
All reactions