Skip to content

@epikodelabs/streamix


@epikodelabs/streamix / src/public-api / AtomValue

Type Alias: AtomValue<A>

AtomValue<A> = A extends Atom<infer T> ? T : never

Defined in: projects/libraries/streamix/src/lib/atoms/atom.ts:89

Extracts the value type of an Atom.

Useful when you want to name the type produced by a piped atom without repeating it manually:

ts
const combined = pipe([atom(1), atom('hello')]);
type CombinedValue = AtomValue<typeof combined>; // [number, string]

Type Parameters

A

A

Released under the GNU AGPL v3 or later.