Closed blakebyrnes closed 2 years ago
Is there a Typescript issue open regarding type extensions not working with default exports?
From typescript manual:
However, there are two limitations to keep in mind:
You can’t declare new top-level declarations in the augmentation — just patches to existing declarations. Default exports also cannot be augmented, only named exports (since you need to augment an export by its exported name, and default is a reserved word - see #14080 for details)
I ported over the Secretagent plugin fix and noticed that types weren't working here.
I finally got plugin types to work, but it requires the extended classes to not have a default export. I don't think this matters for the end developer - it just matters in the client codebase for Tab, Hero, and I think we'll want to enable extensions for FrameEnvironment.
I toyed with converting other classes, but it seems like we would need to change whole codebase or it feels off.