Create an event source and a function to emit events on it
(Note: you must specify the event type (e.g. emitter<number>()), since there's nothing else to infer it from.)
emitter<number>()
A function that emits events, with a .source property they're emitted on.
Create an event source and a function to emit events on it
(Note: you must specify the event type (e.g.
emitter<number>()
), since there's nothing else to infer it from.)