import { Datum } from './datum' import { DATA, Memory, Reduce, Cache, OrderCmd, SetContext, Emitter, LeafCmd, NameBase, CLASS, DEFAULT_RULE_TYPE, } from './type' import { Model } from './model' import { Map } from './map' import { Struct } from './struct' import { List } from './list' import { Query } from './query' declare type Emitters = { order: Emitter reduce: Emitter & { default: Emitter default_origin: Emitter } } declare type ReduceContext = { map: typeof Map query: Query memory: Memory cache: Cache['$format'] paths: { _reduce: Reduce } } export declare class Finder { $name: NameBase all: Query model: typeof Model | typeof Struct list: CLASS> map: typeof Map constructor() join({ $name, model, all, map, list, }: { $name: NameBase all: Query map: typeof Map list: CLASS> model: typeof Model | typeof Struct }): void calculate(query: Query, memory: Memory): void reduce({ map, cache, paths, query, memory }: ReduceContext, ids: string[]): void finish({ map, paths, query }: ReduceContext): void data_set(type: string, from: DATA, parent: Object | undefined): any data_emitter( { base, journal }: SetContext, { item, $group, }: { item: any $group: any } ): Emitters data_init( { model, parent, deploys }: SetContext, { item }: Datum, { reduce, order }: Emitters ): void data_entry({ model }: SetContext, { item }: Datum, { reduce, order }: Emitters): void reset(ctx: SetContext): boolean merge(ctx: SetContext): boolean remove(ctx: SetContext): boolean update(ctx: SetContext, parent: Object): boolean } export {}