Hyperlinkv0.8.0-beta.28

Store

Store.resolveconstsrc/Store.ts:1118
<const C extends StoreContractValue>(
  scope: string | StoreScopeTag,
  contract: C
): Effect.Effect<StoreHandleOf<C>, StoreScopeNotRegistered, Storage>

Resolve the store handle for a scope from the storage in context (an app Service, or the baked-in in-memory default). Collapses the flatMap(bridge, (b) => b.at(scope, contract)) plumbing so consumers never touch the underlying service directly.

Fails StoreScopeNotRegistered when the provided storage doesn't carry this scope — the opt-in path (e.g. persist only if the app wired durable storage for me). For the always-on observability path, use resolveOrDie.

gettersServiceStoreScopeNotRegisteredresolveOrDie
Source src/Store.ts:11187 lines
export const resolve = <const C extends StoreContractValue>(
  scope: string | StoreScopeTag,
  contract: C,
): Effect.Effect<StoreHandleOf<C>, StoreScopeNotRegistered, Storage> =>
  Effect.flatMap(Storage, (bridge) =>
    bridge.at(typeof scope === "string" ? scope : scope.key, contract),
  );
Referenced by 3 symbols