MacroFieldType
A data structure to define the different types of macro fields.
Properties
Name
MacroFieldType.Name:
string
The string that should be referenced inside a MacroDefinition
for a MacroField's
MacroFieldType
Socket comes with the following types:
"string"|"number"|"boolean"|"Color3"|"Vector3"
There is currently no support for adding new types (unless you fork the repo and develop your own)
Icon
MacroFieldType.Icon:
string
A small string/emoji
Functions
Validate
MacroFieldType.
Validate
(
value:
string
) →
any
|
nil
Takes an input value, and returns a type-safe version. Can return nil if there is nothing we can do with it.
ToString
MacroFieldType.
ToString
(
value:
any
) →
string
Takes a type-safe value, and returns it as a string that can be put into the field TextBox
on the UI.