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]: Discriminated unions for (issue timeline) events #619
Comments
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with |
In the past, we've pointed people here to make requests for API features and bugs. |
Describe the need
I have type safety issues with
listEventsForTimeline
operation where I have to use type casting with theas
keyword in typescript based on switching the event type. Using theoctokit/rest.js
client, the code looks like this:It would be useful if discriminated unions were used instead to provide type switching by definition. I put the issue timeline in the title in parentheses as I'm not sure if there are other component schemas that can benefit from this approach.
I assume the component schemas are generated from the API documentation, so I'm not sure if this is possible.
....On an unrelated note, can anyone tell me where I can report bugs for the GitHub API and/or where I can request documentation for undocumented APIs.
SDK Version
No response
API Version
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: