-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Vault Strict Typing cleanup #12512
base: main
Are you sure you want to change the base?
Vault Strict Typing cleanup #12512
Conversation
- Add null default value for class properties - Enforce that the userId is passed - noticeState$ can return null
- refactor title to be a string rather than null
- add guard to exit early on submit but also solves removing null/undefined from typing
- add bang for required types - add default values for null types
- add bang for required types - refactor title to be an empty string
@@ -52,7 +50,7 @@ export class CopyCipherFieldDirective implements OnChanges { | |||
@HostListener("click") | |||
async copy() { | |||
const value = this.getValueToCopy(); | |||
await this.copyCipherFieldService.copy(value, this.action, this.cipher); | |||
await this.copyCipherFieldService.copy(value ?? "", this.action, this.cipher); |
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.
❓ Should this throw an error rather than use a default value? I couldn't decide
New Issues
Fixed Issues
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #12512 +/- ##
==========================================
+ Coverage 33.60% 33.68% +0.08%
==========================================
Files 2925 2921 -4
Lines 91455 91050 -405
Branches 17384 17255 -129
==========================================
- Hits 30730 30667 -63
+ Misses 58308 57996 -312
+ Partials 2417 2387 -30 ☔ View full report in Codecov by Sentry. |
📔 Objective
Another round of cleaning up some of the strict types in
libs/vault
!
to required inputs as stated in the decision document!
within theCipherForm
stories, these are a constant object for the stories so they're always defined.title
to match the needed type🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes