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

Include ./index.d.ts in the package. #486

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

iclanton
Copy link

@iclanton iclanton commented Dec 21, 2022

The package.json declares that this package ships with typings, but the index.d.ts file is not included in the shipped package.

This PR adds that file to the shipped package and does some minor cleanup to the typings.

}

//The default function returns a promise
export default function(options: INpmCheckOptions): {
export default function (options: INpmCheckOptions): {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is no longer equivalent, since the previous export used the CJS syntax.

We need to use the same syntax here to work as before:

Suggested change
export default function (options: INpmCheckOptions): {
export = function (options: INpmCheckOptions): {

Also, I think that we should remove the declare module block altogether. It only causes problems, and since this file is shipped next to index.js I don't see any reason why to have it?

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.

2 participants