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

[JSX] Type & Import name clashing #3237

Closed
delneg opened this issue Oct 15, 2022 · 1 comment · Fixed by #3240
Closed

[JSX] Type & Import name clashing #3237

delneg opened this issue Oct 15, 2022 · 1 comment · Fixed by #3240

Comments

@delneg
Copy link

delneg commented Oct 15, 2022

Description

While using JSX, resulting import shadowed the type from another file being imported which resulted in
"Uncaught TypeError: class constructors must be invoked with 'new'"

Repro code

Bearle/django_private_chat2@e2c455f

This commit fixes the problem

Related information

Fable: 4.0.0-theta-011
Fable.Core: 4.0.0-theta-006
Feliz: 2.0.0-prerelease-003
Fable.React.UseElmish: 1.0.0-beta-001

@alfonsogarciacaro

@alfonsogarciacaro
Copy link
Member

Yes, unfortunately this can be an issue. Maybe we can try to raise a warning if we detect that an import from JSX (or any other emitted JS) conflicts with any other identifier in the file scope.

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

Successfully merging a pull request may close this issue.

2 participants