Convert type OctokitOptions
to interface OctokitOptions
#449
Labels
Type: Feature
New feature or request
type OctokitOptions
to interface OctokitOptions
#449
What’s missing?
To convert
type OctokitOptions
tointerface 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:The text was updated successfully, but these errors were encountered: