@electric-sql/d2mini
Version:
D2Mini is a minimal implementation of Differential Dataflow for performing in-memory incremental view maintenance.
17 lines (16 loc) • 661 B
TypeScript
import { PipedOperator } from '../types.js';
import { DifferenceStreamReader, DifferenceStreamWriter, UnaryOperator } from '../graph.js';
import { MultiSet } from '../multiset.js';
/**
* Operator that outputs the messages in the stream
*/
export declare class OutputOperator<T> extends UnaryOperator<T> {
#private;
constructor(id: number, inputA: DifferenceStreamReader<T>, output: DifferenceStreamWriter<T>, fn: (data: MultiSet<T>) => void);
run(): void;
}
/**
* Outputs the messages in the stream
* @param fn - The function to call with each message
*/
export declare function output<T>(fn: (data: MultiSet<T>) => void): PipedOperator<T, T>;