sambrmg / mysql-error-codes

A list of error codes in Mysql
0 stars 0 forks source link

Cannot access ambient const enums when the '--isolatedModules' flag is provided.ts(2748) #1

Closed rv-jbaker closed 2 years ago

rv-jbaker commented 2 years ago

Hi Sambrmg,

thanks for this package makes things easy however I am getting this error from typescript:

Cannot access ambient const enums when the '--isolatedModules' flag is provided.ts(2748)

I think it can be resolved by updating your index.d.ts file to use declare instead of const. I only say that because looking at the [http-status-codes|https://github.com/prettymuchbryce/http-status-codes] built package their file uses declare instead of const and they don't get this error.

Thanks and hope this helps 👍

sambrmg commented 2 years ago

Hi Joseph Baker,

Thanks for reporting this problem, I solved it with declare as you proposed, the version is the 0.1.3.