-
Notifications
You must be signed in to change notification settings - Fork 297
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
Plugins have no types #366
Comments
I'm trying to use the the lib and it's plugins in an Angular 16 App, so far I had success with the main lib but can't import the plugins.
gives error TS2307: Cannot find module 'cal-heatmap/plugins/LegendLite' or its corresponding type declarations. tried but it gives error TS2664: Invalid module name in augmentation, module 'cal-heatmap/plugins/LegendLite' cannot be found. |
Yeah, to remedy this, I forked the branch and wrote a custom build script without Rollup and have just been using that in my project directly. |
Hi @exoRift it seems your fork isn't public, would you mind sending a pull request or sharing the repo? |
@htrex It's under my organization. https://github.com/guidance-analytics/cal-heatmap It can be installed with ( |
thanks @exoRift It works as a temporary solution, even if it gives |
Yeah, I'm emitting ES code. You can either fork and change the emit, or use |
after some more experiments with cal-heatmap in an angular 16 app it seems that @exoRift first comment is the way to go, I was missing that the |
I encountered the same issue while using React 17 + NextJS 12. I tried adding the following declarations in
However, the error persists 😥. Did I miss anything?" |
Same with angular 17 |
Should be fixed in master, will do some more test before releasing |
Something goes wrong with Rollup when building as the plugins lose their typing (and recognition as importable modules) causing them to need manual declaration like so
However, this, of course, does not come with the typings the plugins should have
The text was updated successfully, but these errors were encountered: