@tempots/dom

OneOfKind() function

Creates a renderable field that matches the value of the kind property in the provided match signal.

It uses the cases object to determine the appropriate field to render based on the value of kind.

Signature:

OneOfKind: extends {
    kind: string;
}>(match: Value, cases: OneOfKindOptions) => Renderable

Parameters

Parameter

Type

Description

match

Value

The signal containing the object to match against.

cases

OneOfKindOptions

The object containing the cases to match against.

Returns: Renderable

  • The renderable field that matches the value of kind.