Skip to content

Question: IsImplicitConstructor in Entity methods from signature files #676

@alfonsogarciacaro

Description

@alfonsogarciacaro

Related to fable-compiler/Fable#571

Fable relies on the property IsImplicitConstructor to translate F# code to JS, as ES2015 classes only accept one unique constructor and the others must be compiled as mangled static methods. However when checking a method from an entity declared in a signature file (.fsi) IsImplicitConstructor always evaluates to false so the constructor call gets compiled wrongly (as Fable thinks it's a static method).

Would it be possible to have IsImplicitConstructor evaluate the same way no matter if it's coming from a signature or an implementation file? Or at least, how can the implementation Entity be accessed from a signature Entity reference? (I haven't found an easy way to do this.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions