-
-
Notifications
You must be signed in to change notification settings - Fork 856
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
LevelEnum type error; Cannot access ambient const enums with --isolatedModules #382
Comments
39 tasks
Seeing this too |
Thank you for switching to a union 🎉 🎉 I've been patching |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chalk
Version:3.0.0
13.7.0
3.7.5
How Do We Reproduce?
chalk
in a TypeScript project--isolatedModules
optionSee minimal repro: https://github.com/MaxMilton/repro-chalk-enum-type
Expected Behaviour
Project builds without type errors.
Actual Behaviour
Type error is thrown due to ambient const enums not supported with the
--isolatedModules
option.Changing
chalk/index.d.ts
from...... to...
... resolves the issue. Since
chalk.Level
is already defined in the source, this change shouldn't impact consumer functionality.There is a similar issue #363 which took a step towards fixing this but didn't quite get all the way there.
Developers upgrading to Jest
v25.1.0
packages are going to run into this.The text was updated successfully, but these errors were encountered: