import { Signal } from "@moq/signals"; import * as Path from "./path.js"; /** * The availability of a broadcast. * * @public */ export interface AnnouncedEntry { path: Path.Valid; active: boolean; } /** Reactive backing state for an {@link Announced}: the pending queue plus a closed flag. */ export declare class AnnouncedState { queue: Signal; closed: Signal; } /** * Handles writing announcements to the announcement queue. * * @public */ export declare class Announced { /** Reactive backing state. */ state: AnnouncedState; /** Path prefix this stream is scoped to. */ prefix: Path.Valid; /** Resolves with the abort error (or undefined) once closed. */ readonly closed: Promise; constructor(prefix?: Path.Valid); /** * Writes an announcement to the queue. * @param announcement - The announcement to write */ append(announcement: AnnouncedEntry): void; /** * Closes the writer. * @param abort - If provided, throw this exception instead of returning undefined. */ close(abort?: Error): void; /** * Returns the next announcement. */ next(): Promise; } //# sourceMappingURL=announced.d.ts.map