export type Id = string | number; export interface Item { [key: string]: Id | Id[] | Item | Item[] | unknown; } export type InputValue = Id | Id[] | Item | Item[] | unknown; export type Mapper = (id: Id) => Id | undefined | Promise; export interface RecursiveRecord { [key: string]: T | RecursiveRecord; } export type MapperRecord = RecursiveRecord; /** * Apply mapper functions to input data recursively. * This deals with nested objects and arrays. * Output also includes all the keys that are not mappers. * In case of missing mapping, if one mapper returns undefined, then, returns undefined for the whole object. * @param input * @param mappers */ export declare function applyMappers(input: T | null | undefined, mappers: MapperRecord): Promise; /** * Takes a tree of object and returns a tree of function mapped to the same structure. */ export declare function bindMappers(tree: RecursiveRecord, callback: (object: T, key: string) => Mapper, isSubPredicate: (object: unknown) => boolean): MapperRecord;