/** * Declares the state of something a component loads from the API, which * `ListState` renders while it isn't loaded. * * @module */ /** * Held by a page or hook for what it fetches, as `useFetchState` returns it, * and passed to `ListState`. `L` is what the loaded state carries besides its * status, as `{ data: T }` for `useFetchState` or a feed's page fields. */ export type LoadState = | { status: "loading" } | { status: "error"; error: string } | ({ status: "loaded" } & L);