Show raw api
{
"functions": [
{
"name": "new",
"desc": "Constructs a new EnumList.\n\n```lua\nlocal directions = EnumList.new(\"Directions\", {\n\t\"Up\",\n\t\"Down\",\n\t\"Left\",\n\t\"Right\",\n})\n\nlocal direction = directions.Up\n```",
"params": [
{
"name": "name",
"desc": "",
"lua_type": "string"
},
{
"name": "enums",
"desc": "",
"lua_type": "{string}"
}
],
"returns": [
{
"desc": "",
"lua_type": "EnumList"
}
],
"function_type": "static",
"source": {
"line": 57,
"path": "modules/enum-list/init.luau"
}
},
{
"name": "BelongsTo",
"desc": "Returns `true` if `obj` belongs to the EnumList.",
"params": [
{
"name": "obj",
"desc": "",
"lua_type": "any"
}
],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "method",
"source": {
"line": 77,
"path": "modules/enum-list/init.luau"
}
},
{
"name": "GetEnumItems",
"desc": "Returns an array of all enum items.",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "{EnumItem}"
}
],
"function_type": "method",
"since": "v2.0.0",
"source": {
"line": 86,
"path": "modules/enum-list/init.luau"
}
},
{
"name": "GetName",
"desc": "Get the name of the enum.",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "string"
}
],
"function_type": "method",
"since": "v2.0.0",
"source": {
"line": 95,
"path": "modules/enum-list/init.luau"
}
}
],
"properties": [],
"types": [
{
"name": "EnumItem",
"desc": "",
"fields": [
{
"name": "Name",
"lua_type": "string",
"desc": ""
},
{
"name": "Value",
"lua_type": "number",
"desc": ""
},
{
"name": "EnumType",
"lua_type": "EnumList",
"desc": ""
}
],
"source": {
"line": 14,
"path": "modules/enum-list/init.luau"
}
}
],
"name": "EnumList",
"desc": "Defines a new Enum.",
"source": {
"line": 37,
"path": "modules/enum-list/init.luau"
}
}