Skip to content

add types to exports in package.json files #6967

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

OliverDudgeon
Copy link

How did you fix the issue?

I've added the missing types fields to the exports in package.json. When using "moduleResolution": "bundler" typescript, currently raises issues like (#5760):

Could not find a declaration file for module 'ketcher-standalone'. '/Users/oliver/codetemp/im/squonk-frontend/apps/data-manager-ui/node_modules/.pnpm/ketcher-standalone@3.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/ketcher-standalone/dist/main.js' implicitly has an 'any' type.
  There are types at '/Users/oliver/codetemp/im/squonk-frontend/apps/data-manager-ui/node_modules/ketcher-standalone/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'ketcher-standalone' library may need to update its package.json or typings.ts(7016)

Now when Typescript uses the exports field, it is able to find the types correctly.

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