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, like