Module / v1.0.0-beta.13

@typed/svelte

34 unique exports available through this public import path, including their members and aliases.

import * as svelte from "@typed/svelte";

function

  • asReadable

    function

    Public function exposed as asReadable from @typed/svelte.

  • asyncState

    function

    Derives status from Typed AsyncData, including optimistic and refreshing states.

  • fromContext

    function

    Carries an existing Effect context into Svelte without acquiring a Layer.

  • fromReadable

    function

    Converts a Svelte readable into an Fx, unsubscribing on interruption.

  • getRuntime

    function

    Optional lookup used by framework adapters during component initialization.

  • provideCurrentRoute

    function

    Extends the structural CurrentRoute for descendants, including nested Typed content. Pass the full mount route, as with CurrentRoute.extend.

  • provideRuntime

    function

    Call during component initialization; the caller retains runtime ownership.

  • provideServices

    function

    Provides reactive service overrides to this component’s descendants.

  • runtimeContext

    function

    Produces a native Svelte mount/render context map.

  • toFx

    function

    Public function exposed as toFx from @typed/svelte.

  • useAsyncData

    function

    Observes an existing AsyncData producer without nesting its state model.

  • useCurrentPath

    function

    Follows the canonical pathname plus query used by Typed’s Matcher.

  • useCurrentRoute

    function

    Reads the structural route owner; navigation does not rewrite this tree.

  • useLocation

    function

    Follows committed entries from browser, server memory, or test Navigation.

  • useNavigation

    function

    Native state plus promise commands using the closest Navigation service. Commands use the latest provider after runtime replacement.

  • useRefSubject

    function

    Observes any RefSubject, including hydrated refs with typed failures. Writes use its serialized transactions; failures also reach state when a native binding ignores the returned Exit. Unmount/runtime replacement cancels writes. The first subscription receives the optional initial value or undefined. Lazy initializers only start after mount; initial can seed matching SSR and hydration values without executing application effects during rendering.

  • useRoute

    function

    Decodes reactive route parameters with Typed’s matcher. By default, leaving the ambient mount yields None. An explicit root confines the wildcard to that root, so paths outside it retain the native RouteNotFound failure.

  • useRuntime

    function

    Reads the closest runtime provider. Its store follows runtime replacements.

  • useService

    function

    Reads any Effect service using the same runtime, SSR, and failure contract.

  • useSource

    function

    Observes an Effect, Stream, Fx, or value after mount. A Svelte source store or runtime store can replace the producer; the previous scope closes first. Server rendering reads only initial, and never starts application effects.

  • view

    function

    A native Typed template that mounts or serializes a Svelte component.

  • withServices

    function

    Shadows services while keeping the parent’s remaining services and lifetime.

interface

  • AsyncState

    interface

    Native stores describing one async producer and its last available value.

  • RefSubjectOptions

    interface

    Overrides the first server/client snapshot, including for an uninitialized ref.

  • RefSubjectStore

    interface

    A native writable whose transactional writes settle with typed Exit results.

  • RouteOptions

    interface

    Options for matching one route through Typed’s native matcher.

  • SourceOptions

    interface

    Used synchronously during SSR and the client’s first render.

  • ViewOptions

    interface · Re-export

    Svelte mount, hydration and SSR options for one island.

type-alias

  • Runtime

    type-alias

    A borrowed execution boundary. ManagedRuntime implements this contract.

  • RuntimeSource

    type-alias

    Public type-alias exposed as RuntimeSource from @typed/svelte.

  • Source

    type-alias

    Public type-alias exposed as Source from @typed/svelte.

variable

  • prefetch

    variable

    Resolves a request-local first snapshot and closes its subscription scope. Pass the result as initial to both server rendering and client hydration. Empty sources yield NoData; failure causes become AsyncData failures.

  • toReadable

    variable

    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.

  • toWritable

    variable

    Exposes a non-failing RefSubject as a writable Svelte store. Writes are synchronous for Svelte subscribers and applied to the RefSubject in the captured Effect context. Both observation and writes belong to the current Scope. After it closes, set/update are inert.