-
Notifications
You must be signed in to change notification settings - Fork 18
refactor: redo API helpers #2971
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
Merged
Merged
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
david-crespo
commented
Nov 12, 2025
| <A extends ApiClient>(api: A) => | ||
| <M extends string & keyof A>( | ||
| method: M, | ||
| params: Params<A[M]>, |
Collaborator
Author
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.
Good riddance!
This was referenced Nov 13, 2025
david-crespo
added a commit
to oxidecomputer/omicron
that referenced
this pull request
Dec 12, 2025
oxidecomputer/console@ab76183...e8b79c3 * [e8b79c3a](oxidecomputer/console@e8b79c3a) oxidecomputer/console#2987 * [ae965cff](oxidecomputer/console@ae965cff) oxidecomputer/console#2986 * [87656470](oxidecomputer/console@87656470) oxidecomputer/console#2981 * [886a26ab](oxidecomputer/console@886a26ab) oxidecomputer/console#2978 * [7f9dda20](oxidecomputer/console@7f9dda20) oxidecomputer/console#2975 * [063d0439](oxidecomputer/console@063d0439) oxidecomputer/console#2973 * [439c7dd3](oxidecomputer/console@439c7dd3) oxidecomputer/console#2971 * [601cdfa8](oxidecomputer/console@601cdfa8) oxidecomputer/console#2967 * [1f2019c8](oxidecomputer/console@1f2019c8) oxidecomputer/console#2966 * [170bf351](oxidecomputer/console@170bf351) oxidecomputer/console#2965 * [716fbbac](oxidecomputer/console@716fbbac) oxidecomputer/console#2962 * [e464bde6](oxidecomputer/console@e464bde6) oxidecomputer/console#2964
david-crespo
added a commit
to oxidecomputer/omicron
that referenced
this pull request
Dec 13, 2025
oxidecomputer/console@ab76183...e8b79c3 * [e8b79c3a](oxidecomputer/console@e8b79c3a) oxidecomputer/console#2987 * [ae965cff](oxidecomputer/console@ae965cff) oxidecomputer/console#2986 * [87656470](oxidecomputer/console@87656470) oxidecomputer/console#2981 * [886a26ab](oxidecomputer/console@886a26ab) oxidecomputer/console#2978 * [7f9dda20](oxidecomputer/console@7f9dda20) oxidecomputer/console#2975 * [063d0439](oxidecomputer/console@063d0439) oxidecomputer/console#2973 * [439c7dd3](oxidecomputer/console@439c7dd3) oxidecomputer/console#2971 * [601cdfa8](oxidecomputer/console@601cdfa8) oxidecomputer/console#2967 * [1f2019c8](oxidecomputer/console@1f2019c8) oxidecomputer/console#2966 * [170bf351](oxidecomputer/console@170bf351) oxidecomputer/console#2965 * [716fbbac](oxidecomputer/console@716fbbac) oxidecomputer/console#2962 * [e464bde6](oxidecomputer/console@e464bde6) oxidecomputer/console#2964
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.
These types have kind of been my nemesis since I put them together in #222. Last week I had the revelation that you can use
api.methods.siloView.nameto get the method name string we need for the query key. I had been passing the method name as a string forever in order to have that string on hand. But if we pass the function directly, inferring the request and response types is trivial: they are just the parameters and return type of the function.From the callsites, the change looks like this.
No big deal, just a lot of lines.