import { Enqueue, Dequeue } from "@effect/core/io/Queue/definition/common";
import { Effect } from "@effect/core/io/Effect/definition";
import { Collection } from "@tsplus/stdlib/collections/Collection/definition";
import { Scope } from "@effect/core/io/Scope/definition";
export declare const HubSym: unique symbol;
export type HubSym = typeof HubSym;
/**
* A `Hub` is an asynchronous message hub into which publishers can publish
* messages of type `A` and subscribers can subscribe to take messages of type
* `A`.
*
* @tsplus type effect/core/io/Hub
*/
export interface Hub extends Enqueue {
get [HubSym](): HubSym;
/**
* Publishes a message to the hub, returning whether the message was published
* to the hub.
*/
publish(this: this, a: A): Effect;
/**
* Publishes all of the specified messages to the hub, returning whether they
* were published to the hub.
*/
publishAll(this: this, as: Collection): Effect;
/**
* Subscribes to receive messages from the hub. The resulting subscription can
* be evaluated multiple times within the scope to take a message from the hub
* each time.
*/
get subscribe(): Effect>;
}
/**
* @tsplus type effect/core/io/Hub.Ops
*/
export interface HubOps {
$: HubAspects;
}
export declare const Hub: HubOps;
/**
* @tsplus type effect/core/io/Hub.Aspects
*/
export interface HubAspects {
}
//# sourceMappingURL=definition.d.ts.map