import { AppFetcher } from '../app/types.js'; import { LocalResourceHandle, ResourceHandle } from '../resource/types.js'; export { useContext, useEnv } from '../app/index.js'; export { Scope } from '../scope/index.js'; /** * Standalone counterpart to `app.Resource`, exported as * `shared.Resource`. Takes the **Env shape `E` as a mandatory first * generic** so the fetcher's `context.env` is typed even when the * resource isn't bound to a single App. * * Call with **no fetcher** (`shared.Resource()`) to declare a * local Resource whose slots are written exclusively through * `context.actions.resource(...).set(value)` rather than by a fetch. * * Always uses an isolated in-memory cache — persistent caching * is an App-level concern wired through `App({ cache })`, so reach for * `app.Resource` when a resource needs to survive reloads. */ export declare function Resource<_E extends object, T, P extends object = Record>(): LocalResourceHandle; export declare function Resource>(fetcher: AppFetcher): ResourceHandle;