import type { PrimaryKey } from '../../../zero-protocol/src/primary-key.ts'; import { type Change } from './change.ts'; import { type Node } from './data.ts'; import { type FetchRequest, type Input, type Operator, type Output, type Storage } from './operator.ts'; import type { SourceSchema } from './schema.ts'; import { type Stream } from './stream.ts'; export type PartitionKey = PrimaryKey; /** * The Take operator is for implementing limit queries. It takes the first n * nodes of its input as determined by the input’s comparator. It then keeps * a *bound* of the last item it has accepted so that it can evaluate whether * new incoming pushes should be accepted or rejected. * * Take can count rows globally or by unique value of some field. * * Maintains the invariant that its output size is always <= limit, even * mid processing of a push. */ export declare class Take implements Operator { #private; constructor(input: Input, storage: Storage, limit: number, partitionKey?: PartitionKey | undefined); setOutput(output: Output): void; getSchema(): SourceSchema; fetch(req: FetchRequest): Stream; cleanup(req: FetchRequest): Stream; push(change: Change): void; destroy(): void; } //# sourceMappingURL=take.d.ts.map