declare interface PipeClass { handle: PipeFunction } declare type PipeFunction = (data: T, next: (data: T) => T) => T; declare type Pipe = PipeFunction | PipeClass; export declare class Pipeline { static send(passable: T): Pipeline; through(pipes: Pipe[]): this; pipe(...pipes: Pipe[]): this; via(method: string): this; then(destination: (data: T) => T): T; thenReturn(): T; }