UNPKG

@connectv/core

Version:

agent-based reactive programming library for typescript/javascript

36 lines (35 loc) 1.13 kB
import { Subscription } from 'rxjs'; import { Source } from '../pin/source'; import { Signature } from './signature'; import { Agent } from './agent'; import { AgentLike } from './agent-like'; /** * * Represents [proxy](https://connective.dev/docs/proxy) agents. * */ export declare class Proxy extends Agent { /** * * Proxies given agent, connecting it to the rest of the flow * that the proxy itself is connected to. * * @param agent * @returns a [subscription](https://rxjs-dev.firebaseapp.com/guide/subscription) object * that can be unsubscribed (call `.unsubscribe()`) to unproxy given agent. * */ proxy(agent: AgentLike): Subscription; protected createOutput(label: string): Source; } /** * * Creates a [proxy](https://connective.dev/docs/proxy) agent. * [Checkout the docs](https://connective.dev/docs/proxy) for examples and further information. * * @param signature the signature of the proxied agent (or a projection of the signature that needs * to be proxied). * */ export declare function proxy(signature: Signature): Proxy; export default proxy;