index.ts
index.ts overview
Section titled “index.ts overview”Since v4.0.0
Exports Grouped by Category
Section titled “Exports Grouped by Category”composables
Section titled “composables”useAtom
Section titled “useAtom”Signature
declare const useAtom: <R, W, Mode extends "value" | "promise" | "promiseExit" = never>( atom: () => Atom.Writable<R, W>, options?: { readonly mode?: ([R] extends [AsyncResult.AsyncResult<any, any>] ? Mode : "value") | undefined }) => readonly [ Readonly<Ref<R>>, write: "promise" extends Mode ? (value: W) => Promise<AsyncResult.AsyncResult.Success<R>> : "promiseExit" extends Mode ? (value: W) => Promise<Exit.Exit<AsyncResult.AsyncResult.Success<R>, AsyncResult.AsyncResult.Failure<R>>> : (value: W | ((value: R) => W)) => void]Since v4.0.0
useAtomRef
Section titled “useAtomRef”Signature
declare const useAtomRef: <A>(atomRef: () => AtomRef.ReadonlyRef<A>) => Readonly<Ref<A>>Since v4.0.0
useAtomSet
Section titled “useAtomSet”Signature
declare const useAtomSet: <R, W, Mode extends "value" | "promise" | "promiseExit" = never>( atom: () => Atom.Writable<R, W>, options?: { readonly mode?: ([R] extends [AsyncResult.AsyncResult<any, any>] ? Mode : "value") | undefined }) => "promise" extends Mode ? ( value: W, options?: { readonly signal?: AbortSignal | undefined } | undefined ) => Promise<AsyncResult.AsyncResult.Success<R>> : "promiseExit" extends Mode ? ( value: W, options?: { readonly signal?: AbortSignal | undefined } | undefined ) => Promise<Exit.Exit<AsyncResult.AsyncResult.Success<R>, AsyncResult.AsyncResult.Failure<R>>> : (value: W | ((value: R) => W)) => voidSince v4.0.0
useAtomValue
Section titled “useAtomValue”Signature
declare const useAtomValue: <A>(atom: () => Atom.Atom<A>) => Readonly<Ref<A>>Since v4.0.0
modules
Section titled “modules”AsyncResult (namespace export)
Section titled “AsyncResult (namespace export)”Re-exports all named exports from the “effect/unstable/reactivity/AsyncResult” module as AsyncResult.
Signature
export * as AsyncResult from "effect/unstable/reactivity/AsyncResult"Since v4.0.0
Atom (namespace export)
Section titled “Atom (namespace export)”Re-exports all named exports from the “effect/unstable/reactivity/Atom” module as Atom.
Signature
export * as Atom from "effect/unstable/reactivity/Atom"Since v4.0.0
AtomRef (namespace export)
Section titled “AtomRef (namespace export)”Re-exports all named exports from the “effect/unstable/reactivity/AtomRef” module as AtomRef.
Signature
export * as AtomRef from "effect/unstable/reactivity/AtomRef"Since v4.0.0
AtomRegistry (namespace export)
Section titled “AtomRegistry (namespace export)”Re-exports all named exports from the “effect/unstable/reactivity/AtomRegistry” module as AtomRegistry.
Signature
export * as AtomRegistry from "effect/unstable/reactivity/AtomRegistry"Since v4.0.0
AtomRpc (namespace export)
Section titled “AtomRpc (namespace export)”Re-exports all named exports from the “effect/unstable/reactivity/AtomRpc” module as AtomRpc.
Signature
export * as AtomRpc from "effect/unstable/reactivity/AtomRpc"Since v4.0.0
re-exports
Section titled “re-exports”AtomHttpApi (namespace export)
Section titled “AtomHttpApi (namespace export)”Re-exports all named exports from the “effect/unstable/reactivity/AtomHttpApi” module as AtomHttpApi.
Signature
export * as AtomHttpApi from "effect/unstable/reactivity/AtomHttpApi"Since v4.0.0
registry
Section titled “registry”defaultRegistry
Section titled “defaultRegistry”Signature
declare const defaultRegistry: AtomRegistry.AtomRegistrySince v4.0.0
injectRegistry
Section titled “injectRegistry”Signature
declare const injectRegistry: () => AtomRegistry.AtomRegistrySince v4.0.0
registryKey
Section titled “registryKey”Signature
declare const registryKey: InjectionKey<AtomRegistry.AtomRegistry>Since v4.0.0