Closed BenReim closed 2 months ago
Actually, this should already work (and does in my tests). The ts-interface-generator finds and enriches the class structures. Whether the class or an instance of it is exported, is an independent matter and whatever you export has the correct enriched structure. Also, the interface generation does happen no matter what exactly is exported.
This means in case your control file exports an instance instead of the class, like:
export default new SampleControl();
then the user can - as expected - write:
import SampleControl from "./SampleControl";
SampleControl.destroyTooltip();
Please let me know if there is still some gap I missed.
The ts-interface generator should consider cases in which not a class, but an instance is exported.
export default new SampleManagedObject();