-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
TypeScript errors in github/lib/github.d.ts
#199
Comments
Digging in a bit deeper while looking into a fix. The |
Is there a workaround for this issue until it was fixed? |
@Skycoder42 You can put a
It seems that these are the only used exports and while this does basically disable type-checking for that part of the code, it will allow your action to properly compile. |
@hross FYI, you were going to take a look at this |
The other option is to turn off noImplicitAny |
@hross that should probably be the last thing to try to fix something :) |
* Get GitHub access token from input * install npm package * fix TypeScript error to successfully build ref: actions/toolkit#199 * npm i strip-ansi to remove control characters * create an issue * use template literal to pass lint * npm run format; npm run lint * use inputs.issue_title as issue title * document inputs.issue_title * add inputs.issue_title
Fixed in #228 |
Describe the bug
The shipped
github.d.ts
file contains errors. The originating code is here: https://github.com/actions/toolkit/blob/master/packages/github/src/github.tsTo Reproduce
Steps to reproduce the behavior:
npm init -y
tsc --init
a.ts
:tsc
Result:
Expected behavior
There shouldn't be errors
Screenshots
Desktop (please complete the following information):
Additional context
This is a very confusing error because the next logical step for a developer would be to
npm install @octokit/graphql
, but if you do this, it just changes the error:It wasn't clear to me why the
.ts
file loads the checked-in.d.ts
instead of just pulling in the real@octokit/grapqhl
module? This pattern is guaranteed to break for.d.ts
emit unless some other source of type data provides a definition for the module.Two possible fixes:
@octokit/graphql
definition@actions/github
->@octokit/graphql
Either way the import needs to be updated
The text was updated successfully, but these errors were encountered: