declare type Callback = (err?: TError, data?: TData) => any declare namespace Leaf { type Tagged = { tag?: T } export type CriteriaTemplate = CriteriaData & Tagged<"criteriaTemplate"> export type Criteria = CriteriaData & Tagged<"criteria"> export type CriteriaData = { ors: Matches[] } export type Matches = { ands: Match[] } & Tagged<"matches"> }