Editor model · function

formatValue

A value as a row shows it.

function formatValue(value: unknown, kind: string): string
import { formatValue } from '@driftengine/editor';

Parameters

ParameterTypeDescription
valueunknown
kindstring

In depth

A boolean reads as a word and an enum as its number, which is as far as this can honestly go: the variant list belongs to the module that declared the enum, and a component is handed enum:Mood — a name and no variants. A consumer holding the list formats its own.