octokit / core.js

Extendable client for GitHub's REST & GraphQL APIs
MIT License
1.18k stars 307 forks source link

[BUG]: OctokitOptions declared locally but not exported #645

Closed mcgear closed 8 months ago

mcgear commented 9 months ago

What happened?

I am trying to use OctokitOptions in a typescript project for DenoJS, but am getting the following error when using this import import { OctokitOptions } from "@octokit/core";

image

Not sure how to handle, thanks for the help.

Versions

octokit/core: https://esm.sh/@octokit/core@v5.0.2

Relevant log output

No response

Code of Conduct

github-actions[bot] commented 9 months ago

👋 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 Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

wolfy1339 commented 9 months ago

You are getting that error because that export does not exist.

It's imported in the index.ts file but not exported.

If you absolutely need to import it, you can use:

import type from "@octokit/core/dist-types/types.d":
mcgear commented 9 months ago

Its mostly for cleanliness of some helper functions we are establishing for Octokit initialization. Any plans to add this as an export? Would it be an accepted PR?

wolfy1339 commented 9 months ago

You can also do this:

type OctokitOptions = ConstructorParameters<Octokit>;

I'm open to a PR

mcgear commented 9 months ago

Created PR #646

github-actions[bot] commented 8 months ago

:tada: This issue has been resolved in version 5.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 5 months ago

:tada: This issue has been resolved in version 5.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: