[FEAT]: Discriminated unions for (issue timeline) events #619
Labels
Status: Up for grabs
Issues that are ready to be worked on by anyone
Type: Feature
New feature or request
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: