@connectv/core
Version:
agent-based reactive programming library for typescript/javascript
57 lines (56 loc) • 1.79 kB
TypeScript
import { Agent } from './agent';
/**
*
* Represents [join](https://connective.dev/docs/join) agents.
*
*/
export declare class Join extends Agent {
readonly keys: string[];
readonly pop: boolean;
private _inject;
private _cache;
/**
*
* @param keys the keys of the joined object
* @param pop should it pop the fork tag or not? Default is `true`
*
*/
constructor(keys: string[], pop?: boolean);
private _receive;
private _cache_key;
private _fill;
private _emit;
private _complete;
protected createOutput(label: string): import("..").PinLike;
protected createEntries(): import("..").PinLike[];
protected createExits(): import("..").PinLike[];
/**
*
* Shortcut for `.out('output')`, which will emit the joined object.
* [Read this](https://connective.dev/docs/handle-error#signature) for more details.
*
*/
get output(): import("..").PinLike;
clear(): this;
}
/**
*
* Creates a [join](https://connective.dev/docs/join) agent. Join agents
* will re-join values created from the same forked emission in parallel, creating
* a joined object with given keys.
* [Checkout the docs](https://connective.dev/docs/join) for examples and further information.
*
* @param keys the keys of the joined object. An input will be created per key.
*
*/
export declare function join(...keys: string[]): Join;
/**
*
* Creates a [join](https://connective.dev/join) agent that does not pop
* the fork tag upon joining.
* [Checkout the docs](https://connective.dev/docs/join) for examples and further information.
*
* @param keys the keys of the joined object. An input will be created per key.
*/
export declare function peekJoin(...keys: string[]): Join;
export default join;