Skip to content
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

Convert type OctokitOptions to interface OctokitOptions #449

Closed
oscard0m opened this issue Mar 3, 2022 · 1 comment · Fixed by #450
Closed

Convert type OctokitOptions to interface OctokitOptions #449

oscard0m opened this issue Mar 3, 2022 · 1 comment · Fixed by #450
Labels
Type: Feature New feature or request
Projects

Comments

@oscard0m
Copy link
Member

oscard0m commented Mar 3, 2022

What’s missing?

To convert type OctokitOptions to interface OctokitOptions would open the door to make more accurate types for Octokit Plugins with specific required options like @octokit/plugin-throttling:

https://github.com/octokit/plugin-throttling.js/blob/c567474ff2f6959a460d1139959052ec70a791a6/src/types.ts#L10-L20

Why?

When trying to deprecate a property for the option object provided to @octokit/plugin-throttling I noticed there is not a good typing to be able to do so.

Also, we are missing all the benefits from a good TS typing for this and other plugins (auto-completion, catch errors on build time, etc...)

Alternatives you tried
You can see this draft PR (octokit/plugin-throttling.js#457) where we did a bit of experimentation but @G-Rath come up with a great solution which implies this change in @octokit/core.js types:

@oscard0m oscard0m added the Type: Feature New feature or request label Mar 3, 2022
@ghost ghost added this to Features in JS Mar 3, 2022
@octokit octokit deleted a comment from Mohm730 Mar 3, 2022
@gr2m gr2m closed this as completed in #450 Mar 3, 2022
JS automation moved this from Features to Done Mar 3, 2022
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 3.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature or request
Projects
No open projects
JS
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant