You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to build a TypeScript project importing chart.js, I get the following error when building:
ERROR: node_modules/chart.js/dist/chunks/index.d.ts:1291:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
1291 enum ScaleTypeEnum {
~~~~
An unhandled exception occurred: node_modules/chart.js/dist/chunks/index.d.ts:1291:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
1291 enum ScaleTypeEnum {
~~~~
Thanks for reporting this @santam85. When you get the error, what are you importing from Chart.js? I have a project written in Typescript (v3.7.5) that uses Chart.js and I did not run into this when upgrading to beta.3.
In fact now I added the registry interfaces, I think we can get rid of enum completely and simply use the registry keys. I will propose a PR in this direction.
When attempting to build a TypeScript project importing chart.js, I get the following error when building:
Seems to be related to this long-standing issue in TypeScript: microsoft/TypeScript#3792
The text was updated successfully, but these errors were encountered: