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

Typescript 4.7 isn't supported #101

Open
pierrickrouxel opened this issue Jan 5, 2024 · 0 comments
Open

Typescript 4.7 isn't supported #101

pierrickrouxel opened this issue Jan 5, 2024 · 0 comments

Comments

@pierrickrouxel
Copy link

Importing BarChart from @rsuite/charts causes a Typescript error.

Since typescript 4.7 the package.json must contains types in the exports attribute. You can find the documentation here: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-7.html#packagejson-exports-imports-and-self-referencing

Can you fix this please?

The import statement:

import { BarChart } from '@rsuite/charts';

The typescript error:

Could not find a declaration file for module '@rsuite/charts'. '.../node_modules/@rsuite/charts/dist/esm/index.js' implicitly has an 'any' type.
  There are types at '.../node_modules/@rsuite/charts/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@rsuite/charts' library may need to update its package.json or typings.ts(7016)
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

No branches or pull requests

1 participant