@tempots/dom

makeComputedRecord() function

Computes a value based on a record of signals and literals.

Signature:

makeComputedRecord: <T extends Record<string, Value<unknown>>, O>(record: T, fn: (value: RemoveSignals<T>) => O) => Computed<O>

Parameters

Parameter

Type

Description

record

T

The record containing signals and literals.

fn

(value: RemoveSignals<T>) => O

The function to compute the value based on the literals.

Returns: Computed<O>

  • The computed value as a signal.