/** One request's state: each scoped object's copy, keyed by a token private to that object. */ export type RequestScope = Map>; type ScopeProvider = () => RequestScope | undefined; export declare function setRequestScopeProvider(provider: ScopeProvider | undefined): void; /** * The process's one request-scope storage: the first caller's `create()`, every later caller's too. * * One server process loads many themes, each bundling its own copy of this module, and each installs * a provider into the one slot above, so the last theme loaded wins it. Were the storages separate, * every other theme's renders would ask that theme's storage for their scope, find none, and fall * back to the shared values: the overlap this module exists to stop. Shared, it does not matter * whose provider sits in the slot. */ export declare function sharedRequestScopeStorage(create: () => S): S; /** * Turns `keys` of `target` into accessors over the running request's copy of them. A request's copy * starts from the values written outside any request, so what a process sets up once carries over. */ export declare function scopeFields(target: object, keys: readonly string[]): void; export {};