Skip to main content
Base type for values that can be stored in inputs. Provides functions for checking the underlying value type.

Static Functions

number

number
Constructors for DataValue types. Each function returns a mutable DataValue container of the corresponding underlying type. Creates a DataValueNumber that stores a number.

string

string
Creates a DataValueString that stores a string.

boolean

boolean
Creates a DataValueBoolean that stores a boolean.

color

color
Creates a DataValueColor that stores a Color.

Methods

isNumber

isNumber() -> boolean
Base type for values that can be stored in inputs. Provides functions for checking the underlying value type. Returns true if the value is a number.
local dv: DataValueNumber = DataValue.number()
print(dv.isNumber) -- true

isString

isString() -> boolean
Returns true if the value is a string.
local dv: DataValueNumber = DataValue.number()
print(dv.isString) -- false

isBoolean

isBoolean() -> boolean
Returns true if the value is a boolean.
local dv: DataValueNumber = DataValue.number()
print(dv.isBoolean) -- false

isColor

isColor() -> boolean
Returns true if the value is a color.
local dv: DataValueNumber = DataValue.number()
print(dv.isColor) -- false