import { Schema, schema } from '@data-client/endpoint'; export default function mapCollection(collection: C) => any, S extends Schema | undefined>(s: S, mapper: M): S extends schema.Collection ? ReturnType> : S extends schema.Object ? { [K in keyof T]: T[K] extends Schema ? typeof mapCollection : T[K]; } : S extends { [K: string]: any; } ? { [K in keyof S]: S[K] extends Schema ? typeof mapCollection : S[K]; } : S; type MapCollection(collection: C) => any, S extends Schema | undefined> = S extends schema.Collection ? ReturnType : S extends schema.Object ? MapCollection : S extends { [K: string]: any; } ? MapObject : never; export type MapObject any, S extends Record> = { [K in keyof S]: S[K] extends Schema ? MapCollection : S[K]; }; export {}; //# sourceMappingURL=mapCollection.d.ts.map