Types: Exports and export assignments are not permitted in module augmentations.
See original GitHub issueBeen trying to install and use Apexcharts inside a Typescript project, but keep getting this weird error.
[ ERROR ] TypeScript: node_modules/apexcharts/types/apexcharts.d.ts:956:1
Exports and export assignments are not permitted in module augmentations.
L955: declare module 'apexcharts' {
L956: export = ApexCharts;
L957: }
I was trying to fix this, and I found a way to get away from this error, I am just not sure if this is a right fix.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Exports and export assignments are not permitted in ...
Module Augmentation: Typescript calls this a module augmentation: You are using an existing module and add new definitions to it.
Read more >Compilation error: "Exports and export assignments are not ...
Description. Importing Splide in an Angular 12 app causes compilation error: Error: node_modules/@splidejs/splide/dist/types/index.
Read more >Fixing Typescript error: TS2666: Exports and ... - Gary Sieling
Fixing Typescript error: TS2666: Exports and export assignments are not permitted in module augmentations.
Read more >Writing a types declaration file for a library where one of the ...
Writing a types declaration file for a library where one of the exported functions is a function imported from another library. How should...
Read more >TypeScript errors and how to fix them
error TS1218: Export assignment is not supported when '–module' flag is 'system'. ... With type-only imports and exports you cannot use a default...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@junedchhipa You are a library and need to export your types… Make it fully public.
Hey @junedchhipa, I think your fix is too simplistic as importing types like ApexAxisChartSeries is no longer possible.
A (very simplistic) use case for importing these types is:
Exporting at least ApexAxisChartSeries would also allow you to properly type the series property here: https://github.com/apexcharts/react-apexcharts/blob/master/types/react-apexcharts.d.ts instead of just using Array<any>.