-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add getAccessKind #398
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #398 +/- ##
==========================================
- Coverage 80.25% 79.60% -0.65%
==========================================
Files 35 36 +1
Lines 6426 6639 +213
Branches 360 437 +77
==========================================
+ Hits 5157 5285 +128
- Misses 1269 1354 +85
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
src/nodes/access.test.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add some more tests 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some, ran out of time+energy to add more. Can file a followup issue.
It would be great to have this (and through this, get |
/** | ||
* What operations(s), if any, an expression applies. | ||
*/ | ||
export enum AccessKind { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it be better to express these in bitwise notation, to make it clear that's how they are supposed to be used?
export enum AccessKind {
None = 0,
Read = 1 << 0,
Write = 1 << 1,
Delete = 1 << 2,
ReadWrite = Read | Write,
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably a bit unnecessary though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it!
PR Checklist
status: accepting prs
Overview
Adds the function, with some rudimentary unit tests.