CASL is an isomorphic authorization JavaScript library which restricts what resources a given user is allowed to access
6.05k
stars
270
forks
source link
feat: update accessibleBy function of casl/prisma to autocomplete action names #965
Open
zunkelty opened 2 months ago
When using the
accessibleBy
function ofcasl/prisma
, the action names property is not autocompleted in Typescript although it could be inferred.e.g. in this case
update
would not be autocompleted which could result in issues and causes a degraded DX.This PR infers the possible actions from the ability passed as the first parameter.