UNPKG

653 BTypeScriptView Raw
1import { SWRConfiguration } from 'swr';
2import { parseFeed } from 'htmlparser2';
3export interface Response<Data> {
4 data?: Data;
5 error?: Error;
6 isValidating: boolean;
7}
8export declare type Feed = ReturnType<typeof parseFeed>;
9/**
10 * The React hook used for reading the Atom feed.
11 * @param feedURL The URL of the Atom feed
12 * @param options Options that are passed to `useSWR()` behind the scenes.
13 * More info: https://swr.vercel.app/docs/options#options
14 * @returns The decoded Atom feed or any errors seen along the way
15 */
16export declare function useAtomFeed(feedURL: string, options?: SWRConfiguration): Response<Feed>;