import { RecoilState, Snapshot } from 'recoil'; export function getSnapshotScopedState({ snapshot, state, contextScopeId, }: { snapshot: Snapshot; state: (scopeId: string) => RecoilState; contextScopeId: string; }) { return snapshot.getLoadable(state(contextScopeId)).valueOrThrow(); }