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

Fixes #3541 #3545

Merged
merged 1 commit into from
Oct 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Fable.Transforms/Fable2Babel.fs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ module Lib =
let tryJsConstructorFor purpose (com: IBabelCompiler) ctx (ent: Fable.Entity) =
let isErased =
match purpose with
| Annotation -> ent.IsMeasure || (FSharp2Fable.Util.isErasedOrStringEnumEntity ent && not ent.IsFSharpUnion)
| Annotation ->
ent.IsMeasure
|| (ent.IsInterface && not com.IsTypeScript)
|| (FSharp2Fable.Util.isErasedOrStringEnumEntity ent && not ent.IsFSharpUnion)
// Historically we have used interfaces to represent JS classes in bindings,
// so we allow explicit type references (e.g. for type testing) when the interface is global or imported.
// But just in case we avoid referencing interfaces for reflection (as the type may not exist in actual code)
Expand Down
Loading