Skip to content

ValueType

Defined in: src/enums/ValueType.ts:8

Enumerates the value types for a configuration item. This is typically used with config database tables: a row’s raw string value is parsed into a JS value according to its type.

NULL: "null"

Defined in: src/enums/ValueType.ts:10

The value is null.


STRING: "string"

Defined in: src/enums/ValueType.ts:12

Parsed as-is, a string.


BOOLEAN: "boolean"

Defined in: src/enums/ValueType.ts:14

Parsed into a boolean (e.g. "true"/"1" -> true).


NUMBER: "number"

Defined in: src/enums/ValueType.ts:16

Parsed into a number (integer or float).


INTEGER: "integer"

Defined in: src/enums/ValueType.ts:18

Parsed into an integer number (base 10).


FLOAT: "float"

Defined in: src/enums/ValueType.ts:20

Parsed into a floating-point number.


HEXADECIMAL: "hexadecimal"

Defined in: src/enums/ValueType.ts:25

A hexadecimal string (with or without a 0x prefix), parsed into a number. Invalid hex throws.


DATETIME: "datetime"

Defined in: src/enums/ValueType.ts:30

A date and time string, parsed into a Date object (RFC 2822 / ISO 8601). Use this when the value carries a time component.


DATE: "date"

Defined in: src/enums/ValueType.ts:36

A calendar date without a time part (e.g. "2026-06-15"). Kept as the validated string — it is not converted to a Date. A value that includes a time, or that isn’t a valid date, throws.


TIME: "time"

Defined in: src/enums/ValueType.ts:42

A clock time in HH:mm or HH:mm:ss format (e.g. "14:30", "23:59:59"). Kept as the validated string. Out-of-range values such as "90:77" throw.


REGEXP: "regexp"

Defined in: src/enums/ValueType.ts:44

A /pattern/flags (or plain pattern) string, parsed into a RegExp.


JSON: "json"

Defined in: src/enums/ValueType.ts:46

A JSON string, parsed via JSON.parse (object, array, etc.).


ANY: "any"

Defined in: src/enums/ValueType.ts:48

Best-effort auto-detection of the value’s type.