Closed seijikun closed 8 months ago
Out of curiosity, how about:
interface CanComponent {
new(opts?: InitOpts): { root: Ractive; };
}
// then
{
components: Registry<CanComponent|Promise<CanComponent>>;
}
or something along those lines Just to get some whinging if you put something that's not a component in the registry? If that doesn't play out, I'm fine with using the any
escape hatch.
At least for our project, that seems to work! Should I change the PR to it?
If you don't mind. I'll see if I can get a build together later today once this gets merged.
I'll see if I can get a build together later today once this gets merged.
You're a treasure! :heart: Thank you so much!
Description:
TypeScript doesn't like the recursiveness of the current typings. This is a quickfix that gets rid of some of the recursiveness, by trading in some type safety. Don't know whether you want to accept that or whether you have a better idea for a proper fix.
Fixes the following issues:
3425 (most cases)