variable / @typed/svelte

toReadable

Exposes a non-failing Fx as a Svelte readable store. Its subscription belongs to the current Effect Scope. Svelte stores have no error channel; handle failures in the Fx before converting, or use the AsyncData integration.

Package version
1.0.0-beta.13
Category
variable

Import

import { toReadable } from "@typed/svelte";

Signatures

export declare const toReadable: <A, R>(source: Fx.Fx<A, never, R>, initial: A) => Effect.Effect<{
    subscribe: (this: void, run: import("svelte/store").Subscriber<A>, invalidate?: () => void) => import("svelte/store").Unsubscriber;
}, never, import("effect/Scope").Scope | R>;

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source