Hi why ts show wrong information when we have this kind of pattern?
class A {
Renderer = RendererA;
}
class B {
Renderer = RendererB;
}
const RendererA = (prop:{instance?:A}) => {};
const RendererB = (prop:{instance?:B}) => {};
declare const Test:A|B;
// should accept instance A|B And Point to RendererA & RendererB, why only RendererA ?
Test.Renderer({instance:Test});
Why when trigger Test.Renderer is tell me RendererA only ! and not RendererA & RendererB where they can handle A|B ! ?
tsPlayground And image if needed