Skip to content

index.ts

Since v4.0.0



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
]

Source

Since v4.0.0

Signature

declare const useAtomRef: <A>(atomRef: () => AtomRef.ReadonlyRef<A>) => Readonly<Ref<A>>

Source

Since v4.0.0

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)) => void

Source

Since v4.0.0

Signature

declare const useAtomValue: <A>(atom: () => Atom.Atom<A>) => Readonly<Ref<A>>

Source

Since v4.0.0

Re-exports all named exports from the “effect/unstable/reactivity/AsyncResult” module as AsyncResult.

Signature

export * as AsyncResult from "effect/unstable/reactivity/AsyncResult"

Source

Since v4.0.0

Re-exports all named exports from the “effect/unstable/reactivity/Atom” module as Atom.

Signature

export * as Atom from "effect/unstable/reactivity/Atom"

Source

Since v4.0.0

Re-exports all named exports from the “effect/unstable/reactivity/AtomRef” module as AtomRef.

Signature

export * as AtomRef from "effect/unstable/reactivity/AtomRef"

Source

Since v4.0.0

Re-exports all named exports from the “effect/unstable/reactivity/AtomRegistry” module as AtomRegistry.

Signature

export * as AtomRegistry from "effect/unstable/reactivity/AtomRegistry"

Source

Since v4.0.0

Re-exports all named exports from the “effect/unstable/reactivity/AtomRpc” module as AtomRpc.

Signature

export * as AtomRpc from "effect/unstable/reactivity/AtomRpc"

Source

Since v4.0.0

Re-exports all named exports from the “effect/unstable/reactivity/AtomHttpApi” module as AtomHttpApi.

Signature

export * as AtomHttpApi from "effect/unstable/reactivity/AtomHttpApi"

Source

Since v4.0.0

Signature

declare const defaultRegistry: AtomRegistry.AtomRegistry

Source

Since v4.0.0

Signature

declare const injectRegistry: () => AtomRegistry.AtomRegistry

Source

Since v4.0.0

Signature

declare const registryKey: InjectionKey<AtomRegistry.AtomRegistry>

Source

Since v4.0.0