import * as starfx from "https://deno.land/x/starfx@v0.13.4/deps.ts";
Variables
The | |
Like | |
A hook to access the redux | |
A hook to access the redux store's state. This hook takes a selector function as an argument. The selector is called with the store state. | |
A hook to access the redux store. |
Functions
Create an Operation that can be either resolved (or rejected) with
a synchronous callback. This is the Effection equivalent of | |
f call | Pause the current operation, then runs a promise, async function, plain function, or operation within a new scope. The calling operation will be resumed (or errored) once call is completed. |
Creates a new queue. Queues are unlimited in size and sending a message to a queue is always synchronous. | |
Create a new scope to serve as an entry point from normal JavaScript execution into Effection. | |
Create a new Signal | |
f each | Consume an effection stream using a simple for-of loop. |
Run the given function or operation when the current operation
shuts down. This is equivalent to running the function or operation
in a | |
f race | Race the given operations against each other and return the value of whichever operation returns first. This has the same purpose as Promise.race. |
Define an Effection resource | |
f run | Execute an operation. |
Sleep for the given amount of milliseconds. | |
Run another operation concurrently as a child of the current one. | |
Indefinitely pause execution of the current operation. It is typically used in conjunction with an action to mark the boundary between setup and teardown. | |
Create an
| |
Get the scope of the currently running Operation. |
Interfaces
A broadcast channel that multiple consumers can subscribe to the via the same Stream, and messages sent to the channel are received by all consumers. The channel is not buffered, so if there are no consumers, the message is dropped. | |
An | |
A FIFO queue which can be used to implement the Subscription
interface directly. Most of the time, you will use either a Signal
or a Channel as the mechanism, but | |
A programatic API to interact with an Effection scope from outside of an Operation. | |
Convert plain JavaScript function calls into a Stream that can be consumed within an operation. If no operation is subscribed to a signal's stream, then sending messages to it is a no-op. | |
The Effection equivalent of an | |
The Effection equivalent of an | |
I Task | A handle to a concurrently running operation that lets you either use the result of that operation, or shut it down. |
This interface allows you to easily create a hook that is properly typed for your store's root state. |