Skip to content

Commit

Permalink
Merge pull request #3545 from ncave/rust
Browse files Browse the repository at this point in the history
Fixes #3541
  • Loading branch information
ncave authored Oct 15, 2023
2 parents 597fd2c + 816743e commit fbc8b87
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit fbc8b87

Please sign in to comment.