import { ObjectId } from 'mongodb'; export type ID = string | ObjectId; export type LinkedWithParent = T & { getParent: () => U; }; export declare function assertObjectID(id: ID, error?: Error): ObjectId; export declare function attachParent(target: T, parent: U): LinkedWithParent; export declare function attachMatchingParent(sources: S[], sourceKey: keyof S, parents: P[], parentKey?: keyof P): LinkedWithParent[]; export declare function attachMatchingParent(sources: S[], sourceKey: keyof S, parents: P[], throwErrorIfNotFound: true): LinkedWithParent[]; export declare function attachMatchingParent(sources: S[], sourceKey: keyof S, parents: P[], parentKey: keyof P, throwErrorIfNotFound: true): LinkedWithParent[];