Skip to main content

Symbol

A 'Symbol' is an opaque marker type.

Symbols have the type 'userdata', but when printed to the console, the name of the symbol is shown.

Functions

named

Symbol.named(namestring) → Symbol

Creates a Symbol with the given name.

When printed or coerced to a string, the symbol will turn into the string given as its name.

Show raw api
{
    "functions": [
        {
            "name": "named",
            "desc": "Creates a Symbol with the given name.\n\nWhen printed or coerced to a string, the symbol will turn into the string\ngiven as its name.",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Symbol"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 20,
                "path": "src/symbol/src/Shared/Symbol.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Symbol",
    "desc": "A 'Symbol' is an opaque marker type.\n\nSymbols have the type 'userdata', but when printed to the console, the name\nof the symbol is shown.",
    "source": {
        "line": 8,
        "path": "src/symbol/src/Shared/Symbol.lua"
    }
}