@logixjs/core
    Preparing search index...

    Interface ModuleHandle<Sh>

    v3: a read-only handle view exposed to Logic for cross-module access.

    • read: read a snapshot value via selector.
    • changes: subscribe to changes of the selector view.
    • dispatch: dispatch an Action to the module.

    The runtime may wrap an implementation based on ModuleRuntime, but the type does not expose any direct State write API.

    interface ModuleHandle<Sh extends AnyModuleShape> {
        actions: {
            [K in string | number | symbol]: ActionFn<
                ActionPayload<Sh["actionMap"][K]>,
                Effect<void, never, never>,
            >
        };
        actions$: Stream<Type<Sh["actionSchema"]>, never, never>;
        changes: <V>(
            selector: (s: Type<Sh["stateSchema"]>) => V,
        ) => Stream<V, never, never>;
        dispatch: (action: Type<Sh["actionSchema"]>) => Effect<void, never, never>;
        read: <V>(
            selector: (s: Type<Sh["stateSchema"]>) => V,
        ) => Effect<V, never, never>;
    }

    Type Parameters

    Index

    Properties

    actions: {
        [K in string | number | symbol]: ActionFn<
            ActionPayload<Sh["actionMap"][K]>,
            Effect<void, never, never>,
        >
    }
    actions$: Stream<Type<Sh["actionSchema"]>, never, never>
    changes: <V>(
        selector: (s: Type<Sh["stateSchema"]>) => V,
    ) => Stream<V, never, never>
    dispatch: (action: Type<Sh["actionSchema"]>) => Effect<void, never, never>
    read: <V>(
        selector: (s: Type<Sh["stateSchema"]>) => V,
    ) => Effect<V, never, never>