Signal is a type of event bus. You can subscribe to events using add method and dispatch using sendN method where N is the number of arguments you wish to pass
Signal is different from a normal event bus in that 1 signal corresponds to 1 event type. For example, in HTML you have addEventListener which lets you subscribe to any kind of event, let's use "mousedown" as a reference. Using a Signal you would instead have a signal corresponding to "mousedown" and dispatch this signal only for this event.
Example
`const mouseDown = new Signal<MouseEvent>(); mouseDown.send1(myMouseEvent);`
Signal is a type of event bus. You can subscribe to events using add method and dispatch using sendN method where N is the number of arguments you wish to pass Signal is different from a normal event bus in that 1 signal corresponds to 1 event type. For example, in HTML you have
addEventListener
which lets you subscribe to any kind of event, let's use "mousedown" as a reference. Using a Signal you would instead have a signal corresponding to "mousedown" and dispatch this signal only for this event.Example