index overview
Added in v1.0.0
Table of contents
composables
useAtom
Signature
export declare const useAtom: <R, W, Mode extends "value" | "promise" | "promiseExit" = never>(
atom: () => Atom.Writable<R, W>,
options?: { readonly mode?: ([R] extends [Result.Result<any, any>] ? Mode : "value") | undefined }
) => readonly [
Readonly<Ref<R>>,
write: "promise" extends Mode
? (value: W) => Promise<Result.Result.Success<R>>
: "promiseExit" extends Mode
? (value: W) => Promise<Exit.Exit<Result.Result.Success<R>, Result.Result.Failure<R>>>
: (value: W | ((value: R) => W)) => void
]
Added in v1.0.0
useAtomRef
Signature
export declare const useAtomRef: <A>(atomRef: () => AtomRef.ReadonlyRef<A>) => Readonly<Ref<A>>
Added in v1.0.0
useAtomSet
Signature
export declare const useAtomSet: <R, W, Mode extends "value" | "promise" | "promiseExit" = never>(
atom: () => Atom.Writable<R, W>,
options?: { readonly mode?: ([R] extends [Result.Result<any, any>] ? Mode : "value") | undefined }
) => "promise" extends Mode
? (value: W, options?: { readonly signal?: AbortSignal | undefined } | undefined) => Promise<Result.Result.Success<R>>
: "promiseExit" extends Mode
? (
value: W,
options?: { readonly signal?: AbortSignal | undefined } | undefined
) => Promise<Exit.Exit<Result.Result.Success<R>, Result.Result.Failure<R>>>
: (value: W | ((value: R) => W)) => void
Added in v1.0.0
useAtomValue
Signature
export declare const useAtomValue: <A>(atom: () => Atom.Atom<A>) => Readonly<Ref<A>>
Added in v1.0.0
modules
From “@effect-atom/atom/Atom”
Re-exports all named exports from the “@effect-atom/atom/Atom” module as Atom.
Signature
export * as Atom from "@effect-atom/atom/Atom"
Added in v1.0.0
From “@effect-atom/atom/AtomRef”
Re-exports all named exports from the “@effect-atom/atom/AtomRef” module as AtomRef.
Signature
export * as AtomRef from "@effect-atom/atom/AtomRef"
Added in v1.0.0
From “@effect-atom/atom/AtomRpc”
Re-exports all named exports from the “@effect-atom/atom/AtomRpc” module as AtomRpc.
Signature
export * as AtomRpc from "@effect-atom/atom/AtomRpc"
Added in v1.0.0
From “@effect-atom/atom/Registry”
Re-exports all named exports from the “@effect-atom/atom/Registry” module as Registry.
Signature
export * as Registry from "@effect-atom/atom/Registry"
Added in v1.0.0
From “@effect-atom/atom/Result”
Re-exports all named exports from the “@effect-atom/atom/Result” module as Result.
Signature
export * as Result from "@effect-atom/atom/Result"
Added in v1.0.0
re-exports
From “@effect-atom/atom/AtomHttpApi”
Re-exports all named exports from the “@effect-atom/atom/AtomHttpApi” module as AtomHttpApi.
Signature
export * as AtomHttpApi from "@effect-atom/atom/AtomHttpApi"
Added in v1.0.0
registry
defaultRegistry
Signature
export declare const defaultRegistry: Registry.Registry
Added in v1.0.0
injectRegistry
Signature
export declare const injectRegistry: () => Registry.Registry
Added in v1.0.0
registryKey
Signature
export declare const registryKey: InjectionKey<Registry.Registry>
Added in v1.0.0