Skip to content
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

Consider using not-const enums to be compatible with isolatedModules #809

Open
davidyuk opened this issue Mar 20, 2024 · 0 comments
Open

Comments

@davidyuk
Copy link

import { Algorithm } from '@node-rs/argon2';
console.log(Algorithm.Argon2d);

when I'm running tsc, it fails with

src/index.ts:2:13 - error TS2748: Cannot access ambient const enums when 'isolatedModules' is enabled.

I have isolatedModules switched on because I'm using Babel to compile my project.

To fix this problem would be best to export usual enums instead of const enum. Related articles:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant