• 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.)

    Type Parameters

    • T

    Returns Emitter<T>

    A function that emits events, with a .source property they're emitted on.