/** * @pwngh/economy-lab * * Copyright (c) Preston Neal * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ import type { Store } from '../ports.js'; export type FetchLike = (request: Request) => Promise; export type HttpStoreOptions = { fetch?: FetchLike; baseUrl?: string; }; /** * Build a {@link Store} that does all its work over HTTP requests. Without a `fetch`, it * creates an in-process server ({@link createStoreServer}) over a fresh in-memory store * and points the client at it, so a bare `httpStore()` is a complete, working Store that * needs no running service or network. * * @see {@link https://economy-lab-docs.pages.dev/economy/ports/storage/ Storage} for how this HTTP backend implements the storage port. */ export declare function httpStore(options?: HttpStoreOptions): Store; export { createStoreServer } from './http-server.js';