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

fix import path for github-script in README #495

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yuheiy
Copy link

@yuheiy yuheiy commented Oct 22, 2024

No description provided.

@yuheiy yuheiy requested a review from a team as a code owner October 22, 2024 14:25
@@ -437,7 +437,7 @@ $ npm i -D @types/github-script@github:actions/github-script
And then add the `jsDoc` declaration to your script like this:
```js
// @ts-check
/** @param {import('@types/github-script').AsyncFunctionArguments} AsyncFunctionArguments */
/** @param {import('github-script').AsyncFunctionArguments} AsyncFunctionArguments */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this not need to match the installed dependency above?

npm i -D @types/github-script@github:actions/github-script

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @types packages are automatically mapped to the packages with @types stripped off.

And importing @types/github-script causes error TS6137. Rewriting to github-script resolves this issue.

ref: microsoft/TypeScript#16472

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How you doing?

@@ -437,7 +437,7 @@ $ npm i -D @types/github-script@github:actions/github-script
And then add the `jsDoc` declaration to your script like this:
```js
// @ts-check
/** @param {import('@types/github-script').AsyncFunctionArguments} AsyncFunctionArguments */
/** @param {import('github-script').AsyncFunctionArguments} AsyncFunctionArguments */

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How you doing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants