-
Notifications
You must be signed in to change notification settings - Fork 454
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
Constant enums are not compiled #112
Comments
Would it be possible for you to create a small repo that can reproduce this issue? |
Please check |
I just browsed through the linked repo. Isn't this more of a Typescript issue than something that's |
Can be. I'll take a closer look during this week. Let's keep it open |
@kulshekhar you right, this is default behaviour. So It shouldn't substitute constant enums even it it's |
It's not clear whether there was a workaround for this or just SOL? I'm consuming a third party library that exports constant enums, same result |
@jayphelps in the linked repo, if the enum is exported and imported, it works fine. Is that possible in your case? A tiny repo with your issue would be the best way to see if we can get this working |
@R00GER can this get added to the readme? It's non obvious behaviour and it seems a lot of people spend time searching for the cause. |
@rikkit I'm a bit hesitant because this doesn't seem to be a ts-jest issue. On the other hand, I see the point in adding a note if there are a lot of people running into this issue. Any PRs which update the README accordingly are welcome |
Hi guys. Imagine I have
tsconfig.json
likeand i have constant enum in
src/data.d.ts
then simply
src/index.ts
tsc
's output forindex.ts
isexports.Bar = 1 /* Bar */;
but inindexSpec.tsx
I've got
ReferenceError: Foo is not defined
. Is it possible to make this work?The text was updated successfully, but these errors were encountered: