(feat) Allow number as valid role and grant type (fixes #93)#94
Closed
vegerot wants to merge 13 commits into
Closed
(feat) Allow number as valid role and grant type (fixes #93)#94vegerot wants to merge 13 commits into
number as valid role and grant type (fixes #93)#94vegerot wants to merge 13 commits into
Conversation
vegerot
force-pushed
the
valid_number_role
branch
from
November 20, 2020 21:28
f69e881 to
e180493
Compare
In some cases it makes sense to have `number`s instead of `string`s for role types. For example, when using `enum`s in TypeScript Fixes onury#93
vegerot
force-pushed
the
valid_number_role
branch
from
November 20, 2020 21:32
e180493 to
0b40633
Compare
onury
force-pushed
the
master
branch
2 times, most recently
from
June 24, 2026 01:41
260e67d to
eb9deac
Compare
Owner
|
Sorry for the very late reply @vegerot. v3.0.0 just shipped — a ground-up rewrite — so this no longer applies to the current codebase. v3 keeps roles (and resources/actions) as string by design; it keeps the grants object, events, and serialization consistent. For TS enums, string enums work directly ( Closing in favor of v3. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In some cases it makes sense to have
numbers instead ofstrings forrole types. For example, when using
enums in TypeScriptFixes #93