-
Notifications
You must be signed in to change notification settings - Fork 32
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
[BUG]: the type ExtractRequestBody
returns never
#528
Comments
There seems to be an issue with TypeScript not liking the indexes we pass Here's a Playground Link demonstrating this issue |
The problem is that A simple workaround is to add a |
This seems like intended behaviour, as some endpoints accept empty request bodies |
🎉 This issue has been resolved in version 9.1.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Maybe my issue turned out to be different, but I thought it was the same; I updated to 9.1.3 but still get an error related to this
You can see the error here: https://github.com/microsoft/TypeScript/actions/runs/4823551961/jobs/8592186478?pr=53966 We pinned this dep back in TypeScript and are hoping to be able to unpin it again. Should I file a new issue? Or is it the same and this wasn't actually fixed? |
Hey @jakebailey, apologies for the trouble here. I'm looking at this now to figure out what's happening. It appears to be the same or similar issue. We'll let you know - and if it ends up being different, I'll open a new tracking issue for you so we can get moving on a solution more quickly. |
I found an instance of what @wolfy1339 found in types.ts in the types reference in plugin-rest-endpoint-method.js I'm going to have a closer look at @octokit/types.ts to see if I can find any more situations where this type of thing might occur. I feel like @wolfy1339's solution is solid, It may just need to be propagated to other areas as well. |
Ok.. it looks like things are held up on the octokit/openapi side (one of the workflows is not running. Let me see if I can get that unblocked and hopefully, that will get things sorted here. |
The openapi side shouldn't affect the types package. If it still happens, I'll have a look this weekend |
This was mixing up my thinking around that, but I am glad that's not the case. Thanks for the clarity! |
Some clarifications, It is true that that file is generated and overwritten each time the openapi spec changes. The generation happens using the template file I edited. Because I edited the template, every time the file is regenerated, the changes will still be present. |
Thanks, that did seem to fix the errors I listed above, but, now there's new ones. I'll make a new issue. |
Please wait for #533 to be released here and downstream, before making another issue please. I'm going to merge them ASAP |
Ah, sorry, I was too quick and filed #534. I'll wait a bit more 😄 |
What happened?
While updating
@octoit/plugin-rest-endpoint-methods
to use the latest release of this package, in octokit/plugin-rest-endpoint-methods.js#632, the tests are erroring out.I managed to narrow it down to the
ExtractRequestBody
type, as can be seen in the code snippet belowtypes.ts/src/generated/Endpoints.ts
Lines 21 to 37 in e795680
Versions
@octokit/types
v9.1.2typescript
v5.0.4Relevant log output
The following error is for the
PATCH /repos/{owner}/{repo}/labels/{name}
endpoint. Every error is similar to itCode of Conduct
The text was updated successfully, but these errors were encountered: