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

Error while importing an enum #6435

Open
3 tasks done
michaldudak opened this issue Feb 1, 2022 · 1 comment
Open
3 tasks done

Error while importing an enum #6435

michaldudak opened this issue Feb 1, 2022 · 1 comment

Comments

@michaldudak
Copy link

🐛 bug report

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project
    adheres to.
  • I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

Description of the problem

I'm trying to reference a field of an object defined originally as a Typescript enum. The imported value is, however, undefined.

How has this issue affected you? What are you trying to accomplish?

The code fails to run just on Codesandbox. It does work well locally and on StackBlitz.

To Reproduce

See the linked sandbox.

The ActionTypes object is defined in types.ts and exported from index.ts.
When imported in the sandbox, the ActionTypes object is undefined. As mentioned above, this does work well when executed locally or on StackBlitz.

Additionally, the console shows: "Could not consume error: Error: Something is really wrong."

Link to sandbox: link

Your Environment

Software Name/Version
Сodesandbox
Browser Edge, Safari
Operating System Windows 10, MacOS 12.1
@CodeSandboxTeam
Copy link

CodeSandboxTeam commented Feb 2, 2022 via email

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

2 participants