UNPKG

@helium/http

Version:

HTTP library for interacting with the Helium blockchain API

19 lines 657 B
import DataModel from './models/DataModel'; interface FetchMoreFn { (params: object): Promise<ResourceList<any>>; } export default class ResourceList<T extends DataModel> { data: Array<T>; private fetchMore?; private cursor?; private takeIterator?; constructor(data: Array<T>, fetchMore?: FetchMoreFn, cursor?: string); nextPage(): Promise<ResourceList<T>>; get hasMore(): boolean; [Symbol.asyncIterator](): AsyncGenerator<any, void, any>; take(count: number): Promise<Array<T>>; takeReset(): void; takeJSON(count: number): Promise<Omit<T, 'client'>[]>; } export {}; //# sourceMappingURL=ResourceList.d.ts.map