UNPKG

contentful-management

Version:
6 lines (5 loc) 385 B
import type { CollectionProp, QueryParams } from '../common-types'; type IterableFn<P = any, T = any> = (params: P) => Promise<CollectionProp<T>>; type ParamsType<T extends IterableFn> = T extends (params: infer P) => any ? P : never; export declare const asIterator: <P extends QueryParams, T, F extends IterableFn<P, T>>(fn: F, params: ParamsType<F>) => AsyncIterable<T>; export {};