I'm using a BehaviourSubject purely as trigger, so the payload doesn't matter. The subject should "fire" (call next) on subscription (a simple Subject wouldn't work!). In principle it would be enough to have a BehaviourSubject<void> for this purpose:
const readonly trigger = new BehaviourSubject<void>()
^^
must not be empty
However, it seems to be impossible to create such a subject. Or is there a way to create a BehaviourSubject of type void without an initial value?
clearly
Subjectdoesn't meet your needs as you want a trigger on subscription. you can set the initial value toundefinedthough...or
nullshould work fine too.