-
Notifications
You must be signed in to change notification settings - Fork 133
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
SNOW-1454180: const enum
s in TypeScript declaration file means enums cannot be accessed when isolatedModules
TS compiler option is set
#848
Comments
const enum
s in TypeScript declaration file means enums cannot be accessed when isolatedModules
TS compiler option is set const enum
s in TypeScript declaration file means enums cannot be accessed when isolatedModules
TS compiler option is set
hi and thank you for reporting this - taking a look. would disabling |
Hi David - no problem, and thanks for the quick response. It's recommended for library authors to always set |
okay, got you MT and thank you for the additional clarification. Guess we have no other option than convert these to |
Makes sense, thanks very much! We'll use that workaround for now. |
Will be addressed in PR #852 |
PR #852 merged and will be part of the next upcoming release (usually happens at the end of the month) |
released with Snowflake Node.JS driver v1.12.0 |
Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!
1. What version of NodeJS driver are you using?
1.11.0
2. What operating system and processor architecture are you using?
macOS / ARM
3. What version of NodeJS are you using?
18.16.0 / 9.5.1
4. What are the component versions in the environment (
npm list
)?N/A
5.Server version:* E.g. 1.90.1
N/A (library author)
6. What did you do?
When using the newly-released first-party TypeScript declaration file, it's not possible to access the enums it provides, because they're declared as
const enum
. It's not recommended to useconst enum
s in library declarations for this reason.You can see this issue in this TypeScript playground: https://www.typescriptlang.org/play/?isolatedModules=true#code/JYWwDg9gTgLgBAZwHYQO4DMA2BDA1gUwBo4BvOAGQgHNz8A3fTOAXznSghDgHJk0s8+ALQIAJrm4BuAFDSA9HLgAxbMEwI4qABb4kcYAgg4Y+UQFkIogK6Z8Gg4nzwYEODChX8+vTAQBjCCR0YCppPgwcAgA6AKCQqyh8AAoyTGpaBkwALgp0+kYogHUAQQAlADkWAEoZeUVizFRsAE8NVGhcBDCUCMEYwOCqBOTUvMyc7hKK7jhsDUoafKZmGqA
7. What did you expect to see?
No errors produced by this line, even if
isolatedModules
is turned on in tsconfig.8. Can you set logging to DEBUG and collect the logs?
N/A
9. What is your Snowflake account identifier, if any? (Optional)
N/A
The text was updated successfully, but these errors were encountered: