@electric-sql/d2ts
Version:
D2TS is a TypeScript implementation of Differential Dataflow.
13 lines (12 loc) • 750 B
TypeScript
import { IStreamBuilder, PipedOperator } from '../../types.js';
import { KeyValue } from '../../types.js';
import { SQLiteDb } from '../database.js';
/**
* Filters the elements of a keyed stream, by keys of another stream.
* This allows you to build pipelies where you have multiple outputs that are related,
* such as a streams of issues and comments for a project.
*
* @param other - The other stream to filter by, which must have the same key type as the input stream
* @param db - Optional SQLite database (can be injected via context)
*/
export declare function filterBy<K, V1 extends T extends KeyValue<infer _KT, infer VT> ? VT : never, T>(other: IStreamBuilder<KeyValue<K, unknown>>, db?: SQLiteDb): PipedOperator<T, KeyValue<K, V1>>;