import { Annotation, Document, Join } from "./internals"; export declare function compareAnnotations(a: Annotation, b: Annotation): number; export declare class Collection { document: Document; annotations: Array>; constructor(document: Document, annotations: Array>); [Symbol.iterator](): IterableIterator>; get length(): number; map(mapper: (annotation: Annotation, index: number) => T): T[]; forEach(callback: (annotation: Annotation, index: number) => void): void; reduce(reducer: (accumulator: T, currentValue: Annotation, currentIndex: number, array: Array>) => T, initialValue: T): T; sort(sortFunction?: typeof compareAnnotations): this; where(filter: { [key: string]: any; } | ((annotation: Annotation) => boolean)): AnnotationCollection; as(name: T): NamedCollection; update(updater: (annotation: Annotation) => void | { add?: Array>; remove?: Array>; retain?: Array>; update?: Array<[Annotation, Annotation]>; }): this; toJSON(): { id: string; type: string; start: number; end: number; attributes: any; }[]; } export interface Renaming { [key: string]: string | Renaming; } export interface FlattenedRenaming { [key: string]: string; } export declare class AnnotationCollection extends Collection { set(patch: any): this; unset(...keys: string[]): this; rename(renaming: Renaming): this; remove(): void; } export declare class NamedCollection extends Collection { readonly name: Left; constructor(document: Document, annotations: Array>, name: Left); outerJoin(rightCollection: NamedCollection, filter: (lhs: Annotation, rhs: Annotation) => boolean): never | Join; join(rightCollection: NamedCollection, filter: (lhs: Annotation, rhs: Annotation) => boolean): never | Join; } //# sourceMappingURL=collection.d.ts.map