import type { Endpoint } from "../endpoint/Endpoint.js"; import { NONE } from "../util/constants.js"; import { Store } from "./Store.js"; /** * Store object that loads a result from an API endpoint and manages its state. * * @todo Needs support for `EndpointOptions` to set headers etc. */ export declare class EndpointStore extends Store { static CANCELLED: symbol; readonly endpoint: Endpoint; private _payload; private _abort; get payload(): P; set payload(next: P); /** Maximum age data can be before a fetch is triggered (defaults to 5 minutes). */ maxAge: number; get value(): R; set value(value: R | typeof NONE); constructor(endpoint: Endpoint, payload: P); refetch(): Promise; /** Call the API now to fetch the data. */ private _call; }