Interface IFeed<Response, Item>

interface IFeed<Response, Item> {
    input: any;
    handle(response: Response): boolean;
    items(raw: Response): Item[];
    request(...args: any[]): Promise<Response>;
}

Type Parameters

  • Response
  • Item

Hierarchy (view full)

Implemented by

    Properties

    Methods

    Properties

    input: any

    Methods

    • Parameters

      Returns boolean

      boolean whether next page exists or not

      This function automatically calls after each successful request. Usually mutates the feed state.

    • Parameters

      • Rest...args: any[]

      Returns Promise<Response>