import { BasePipeline } from './base-pipeline'; import { MiddlewareContextInterface, MiddlewareLikeType } from './interfaces'; /** * SyncPipeline sequentially executes internally stored middleware against the context provided as .process argument. * Unlike `@priestine/data` Pipeline monoid, SyncPipeline does not resolve Promises along the way nor it returns a * Promise in the end. * * @implements IterableIterator * @implements PipelineInterface */ export declare class SyncPipeline> extends BasePipeline { /** * Pointer interface for lifting given pieces of middleware to a SyncPipeline. * * @param {...MiddlewareLikeType} middleware * @returns {Pipeline} */ static of>(...middleware: Array>): SyncPipeline; /** * Pointer interface for creating a SyncPipeline from array of middleware. * * @param {Array>} middleware * @returns {Pipeline} */ static from>(middleware: Array>): SyncPipeline; /** * Pointer interface for creating an empty pipeline. Context type is optional and defaults to * MiddlewareContextInterface. * * @returns {Pipeline} */ static empty>(): SyncPipeline; /** * Sequentially process middleware internally stored in the Pipeline. * * If the middleware currently being executed returns a Promise, the Promise will be resolved before moving on to * the next middleware. Pipeline does not block the event loop. To avoid resolving the Promise, assign it to a key * of the middleware context and return void. * * @param {TContext} ctx * @returns {any} */ process(ctx: TContext): any; }