-
Notifications
You must be signed in to change notification settings - Fork 0
Improve types #388
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
base: develop
Are you sure you want to change the base?
Improve types #388
Conversation
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.
Checks have passed and this pull request is ready for manual review
Now is not exact match but 'isLike'
Reorder methods to reduce the select set Change 'const' for 'let' to just copy the results rather than iterating over it
This allow to do intersection more performant
This allow to handle all request at the same time Which helps with the time-performance of the endpoint
Using this method on branded IDs does harm, because we lose ID branding and get generic `number` type instead
Some of ID definitions were `number` because they predated the existence of hpc-api-core
The types of these variables are `OrganizationId | null` and if type is correct, there is no need for nullish coalescing
This iterator is implicit when using `for...of` loop
The same thing is happening in `getOrCreate()` below
8b6621a
to
991c57f
Compare
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.
Checks have passed and this pull request is ready for manual review
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.
Checks have passed and this pull request is ready for manual review
This started as I have noticed that branded IDs aren't done properly in bunch of places in the codebase, but I also did some other improvements along the way. @manelcecs, there are two TODO comments in which I wanted to point out typing issues I'd like you to improve.