toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

Typings always return "never" for Octokit calls from @actions/github

Open tleunen opened this issue 4 years ago • 2 comments

Describe the bug I've reused code from the readme to try a few things and the return value for all calls to octokit.rest.X is always never.

To Reproduce Steps to reproduce the behavior:

  1. Create an index.ts file with the default usage from https://github.com/actions/toolkit/tree/main/packages/github#usage
  2. Replace require statement with imports if needed
  3. Notice TS errors because pull_request is typed never.

Expected behavior Return value should be properly set

Screenshots image

Notice the return value from get is Promise<never>. All calls return the same thing, issues, checks, etc..

tleunen avatar Jan 04 '22 19:01 tleunen

This is working fine for me.

Could you please show the versions involved (npm, tsc, dependencies) and then run tsc from the command line and show the entire output?

Additionally, it would be helpful if you could provide a small reproducing project to take a look at.

rethab avatar Jan 19 '22 08:01 rethab

I'm also seeing this behavior with @octokit/rest 19.0.4. I don't as yet have a simple repro in a project that i can upload.

MarkZuber avatar Feb 16 '23 18:02 MarkZuber