UNPKG

@connectv/core

Version:

agent-based reactive programming library for typescript/javascript

48 lines (47 loc) 1.52 kB
import { PinLike } from '../pin/pin-like'; import { Agent } from './agent'; /** * * Represents [handle error](https://connective.dev/docs/handle-error) agents. * */ export declare class HandleError extends Agent { private _err; private _gate; constructor(); protected createOutput(label: string): PinLike; protected createEntries(): PinLike[]; protected createExits(): PinLike[]; clear(): this; /** * * Shortcut for `.in('input')`, the input pin receiving values. * [Read this](https://connective.dev/docs/handle-error#signature) for more details. * */ get input(): PinLike; /** * * Shortcut for `.out('output')`, which will emit error-free values. * [Read this](https://connective.dev/docs/handle-error#signature) for more details. * */ get output(): PinLike; /** * * Shortcut for `.out('error')`, which will emit errors. * [Read this](https://connective.dev/docs/handle-error#signature) for more details. * */ get error(): PinLike; } /** * * Creates a [handle error](https://connective.dev/docs/handle-error) agent. * Handle error agents will pass on incoming values, but also will catch errors * occuring upstream and pass them along, stopping the flow from closing in resposne to such errors. * [Checkout the docs](https://connective.dev/docs/handle-error) for examples and further information. * */ export declare function handleError(): HandleError; export default handleError;