@serenity-is/corelib / computed

Variable: computed()

const computed: <T>(fn, options?) => Computed<T>

Defined in: ../domwise/dist/index.d.ts:2541

Creates a computed (derived) signal that re-computes when its dependencies change. Re-exported from @preact/signals-core.

Type Parameters

T

T

The type of the computed value.

Parameters

fn

() => T

A computation function that returns the derived value.

options?

SignalOptions<T>

Optional signal options.

Returns

Computed<T>

A read-only Computed<T> signal.