(
atom: Atom.Atom<AsyncResult.AsyncResult<A, E>>,
options?: {
readonly staleTime?: number
readonly gcTime?: number | "infinity"
readonly idleTTL?: number | "infinity"
readonly refetchOnWindowFocus?: boolean
readonly revalidateOnFocus?: boolean
readonly structuralSharing?: boolean
readonly refetchInterval?: number
readonly refreshEvery?: number
}
)
| 446 | atom: () => Atom.Writable<Atom.PullResult<A, E>, void> |
| 447 | ): StreamQueryView<A, E> => { |
| 448 | const registry = injectRegistry() |
| 449 | const atomRef = computed(atom) |
| 450 | const atomResult = useAtomValue(() => atomRef.value) |
| 451 | const result = computed(() => atomResult.value) |
| 452 | const pull = () => registry.set(atomRef.value, void 0) |
| 453 | const refresh = () => registry.refresh(atomRef.value) |
| 454 | const awaitResult = () => awaitAtomResult(registry, atomRef.value) |
| 455 | const pullAndAwait = () => |
| 456 | Effect.gen(function*() { |
| 457 | pull() |
| 458 | return yield* awaitResult() |
| 459 | }) |
| 460 | const items = computed(() => |
| 461 | Option.getOrElse( |
| 462 | Option.map(AsyncResult.value(result.value), (_) => _.items), |
| 463 | () => [] |
no test coverage detected
searching dependent graphs…