import * as Fiber from "./Fiber.js"; import * as Injector from "./Injector.js"; import * as Message from "./Message.js"; import * as Observable from "./Observable/index.js"; export { ServerAgent as t }; type Input = Observable.t | Message.GarbageCollect>; type Output = Required | Message.SetValue>>; /** * Encapsulates the responsibilities of a server in order to fulfill the * transporter protocol. * * A server listens for incoming messages to call a function or to dispose of * itself. When a server receives a message to call a function it calls the * function and then may respond with either an error or a value. * * When a server is created its address is added to the global address book. * That address is considered "claimed" and is unavailable until the server is * terminated. */ declare class ServerAgent extends Fiber.t { #private; readonly address: string; private readonly decode; private readonly encode; private readonly input; private readonly output; readonly value: unknown; readonly injector?: Injector.t | undefined; constructor(address: string, decode: (value: unknown) => unknown, encode: (value: unknown) => unknown, input: Input, output: Output, value: unknown, injector?: Injector.t | undefined); } export interface Options { address: string; decode(value: unknown): unknown; encode(value: unknown): unknown; injector?: Injector.t; input: Input; output: Output; provide: unknown; } /** * Creates a new `ServerAgent`. */ export declare function init({ address, decode, encode, input, output, provide: value, injector }: Options): ServerAgent; //# sourceMappingURL=ServerAgent.d.ts.map