@connectv/core
Version:
agent-based reactive programming library for typescript/javascript
38 lines (37 loc) • 1.24 kB
TypeScript
import { Emission } from '../shared/emission';
import { Pin } from './pin';
import { PinLike } from './pin-like';
import { PinMap } from './pin-map';
/**
*
* Represents [pack](https://connective.dev/docs/pack) pins.
*
*/
export declare class Pack extends Pin {
readonly pinmap?: PinMap | undefined;
constructor(pinmap?: PinMap | undefined);
/**
*
* Resolves the underlying observable by
* [combining the latest values](https://rxjs-dev.firebaseapp.com/api/index/function/combineLatest)
* from corresponding observables of inbound pins.
*
* If a `PinMap` is passed to the constructor, it will instead resolve
* by combining the latest values from instantiated pins of the passed `PinMap`.
*
* @param inbound
*
*/
protected resolve(inbound: PinLike[]): import("rxjs").Observable<Emission>;
}
/**
*
* Creates a [pack](https://connective.dev/docs/pack) pin.
*
* @param stuff If passed, the pin will be connected to all given pins.
* If any of the stuff is a `PinMap` instead of a `Pin`, then upon resolution
* the pack will be connected to all of its realized pins.
*
*/
export declare function pack(...stuff: (PinMap | PinLike)[]): PinLike;
export default pack;