import { type Observable } from '../core/index.mjs'; /** * Creates an event emitter for void events (events without payload). * Returns a tuple of [observable, emitter function]. * * @returns A tuple containing the observable and the emitter function * * @example * ```ts * const [click$, emitClick] = createEventEmitter(); * * const mut_clickCount = { value: 0 }; * * click$.subscribe(() => { * mut_clickCount.value += 1; * }); * * emitClick(); // logs: Clicked! * * assert.deepStrictEqual(mut_clickCount.value, 1); * * emitClick(); * * emitClick(); * * assert.deepStrictEqual(mut_clickCount.value, 3); * ``` */ export declare const createEventEmitter: () => readonly [Observable, () => void]; /** * Creates an event emitter with typed payload. * Returns a tuple of [observable, emitter function]. * * @template A - The type of the event payload * @returns A tuple containing the observable and the emitter function * * @example * ```ts * const [message$, emitMessage] = createValueEmitter(); * * const messageHistory: string[] = []; * * message$.subscribe((msg) => { * messageHistory.push(msg); * }); * * emitMessage('Hello'); // logs: Hello * * assert.deepStrictEqual(messageHistory, ['Hello']); * * emitMessage('World'); * * assert.deepStrictEqual(messageHistory, ['Hello', 'World']); * ``` */ export declare const createValueEmitter: () => readonly [Observable, (value: A) => void]; //# sourceMappingURL=create-event-emitter.d.mts.map