@tempots/dom

OneOfValue() function

Creates a renderable value that represents one of the provided cases based on the given match signal.

The match signal should emit a value that matches one of the keys in the cases object.

Signature:

OneOfValue: extends symbol | number | string>(match: Value, cases: OneOfValueOptions) => Renderable

Parameters

Parameter

Type

Description

match

Value

The match signal.

cases

OneOfValueOptions

The options for the one-of value.

Returns: Renderable

  • The renderable value representing one of the cases.