function readPage
readPage<T>(
res: Response,
deserialize: (wire: Wire<T>) => T
): Promise<PaginatedData<T>>

Returns the page res answers, its items deserialized.

Type Parameters

Parameters

deserialize: (wire: Wire<T>) => T

Return Type

Promise<PaginatedData<T>>

Throws

Error

With the server's message when it refuses, and when the body isn't an envelope.

Usage

import { readPage } from "src/utils/feed/pagedList.ts";