You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, Typscript enums use numbers by default, and .read, .update, etc. only accept string | string[]. (and .grant also accepts IAccessInfo)
Proposal:
I've read through a lot of the code that uses these roles, and I can't see any reason we couldn't also accept number | number[] as part of it.
Context:
I want to be able to define the roles in my application as a
const enum
in TypeScript like soProblem:
However, Typscript enums use
number
s by default, and.read
,.update
, etc. only acceptstring | string[]
. (and.grant
also acceptsIAccessInfo
)Proposal:
I've read through a lot of the code that uses these roles, and I can't see any reason we couldn't also accept
number | number[]
as part of it.Workaround:
Use
string
enums instead, likeThe text was updated successfully, but these errors were encountered: