Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add types export to package.json #20

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

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

Conversation

Khauri
Copy link

@Khauri Khauri commented Feb 9, 2024

This PR adds the "types" field to the exports in the package.json pointed to the generated dist/index.d.ts.

Without it, my project was unable to pull any types for yieldparser, which made it a tad bit harder to work with.

This is the error typsecript reported:

Could not find a declaration file for module 'yieldparser'. 'node_modules/yieldparser/dist/yieldparser.module.js' implicitly has an 'any' type.
  There are types at 'node_modules/yieldparser/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'yieldparser' library may need to update its package.json or typings.

Let me know if you find any issues.

Also thanks for creating such a cool parser generator. I've found it really nice for things that are too complex for regex but not so much that I'd want to write a whole grammar for

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.

1 participant