Skip to content

@jsvision/datagrid / InvertibleFormat

Interface: InvertibleFormat<V>

Defined in: datagrid/src/format.ts:54

A formatter that also round-trips: the display string AND its matched inverse.

Type Parameters

V

V

Properties

format

readonly format: (value, row) => string

Defined in: datagrid/src/format.ts:56

Formats a value for display.

Parameters

value

V

row

unknown

Returns

string


parse

readonly parse: (text) => typeof PARSE_FAILED | V

Defined in: datagrid/src/format.ts:58

Inverse of format; returns PARSE_FAILED for a non-parseable string (never NaN).

Parameters

text

string

Returns

typeof PARSE_FAILED | V