Skip to main content

LinkUtils

Utility functions for links. Links are an ObjectValue pointing to something else!

Functions

LinkUtils.createLink(
linkNamestring,
fromInstance,
) → ObjectValue

Creates a new link with the given name.

getAllLinkValues

LinkUtils.getAllLinkValues(
linkNamestring,
fromInstance
) → {Instance}

Gets all link values, as long as the values are not nil.

setSingleLinkValue

LinkUtils.setSingleLinkValue(
linkNamestring,
fromInstance,
) → Instance | nil

Ensures after operation a single link is pointed to the value, unless the value is "nil" in which case no link will be set

LinkUtils.getAllLinks(
linkNamestring,
fromInstance
) → {ObjectValue}

Gets all links underneath an instance.

getLinkValue

LinkUtils.getLinkValue(
linkNamestring,
fromInstance
) → {Instance}

Gets the first links value

promiseLinkValue

LinkUtils.promiseLinkValue(
maidMaid,
linkNamestring,
fromInstance
) → Promise<Instance>

Promises the first link value that is truthy

Show raw api
{
    "functions": [
        {
            "name": "createLink",
            "desc": "Creates a new link with the given name.",
            "params": [
                {
                    "name": "linkName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "from",
                    "desc": "",
                    "lua_type": "Instance"
                },
                {
                    "name": "to",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ObjectValue"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 20,
                "path": "src/linkutils/src/Shared/LinkUtils.lua"
            }
        },
        {
            "name": "getAllLinkValues",
            "desc": "Gets all link values, as long as the values are not nil.",
            "params": [
                {
                    "name": "linkName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "from",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ Instance }"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 40,
                "path": "src/linkutils/src/Shared/LinkUtils.lua"
            }
        },
        {
            "name": "setSingleLinkValue",
            "desc": "Ensures after operation a single link is pointed to the value, unless the value is \"nil\"\nin which case no link will be set",
            "params": [
                {
                    "name": "linkName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "from",
                    "desc": "",
                    "lua_type": "Instance"
                },
                {
                    "name": "to",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Instance | nil"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 68,
                "path": "src/linkutils/src/Shared/LinkUtils.lua"
            }
        },
        {
            "name": "getAllLinks",
            "desc": "Gets all links underneath an instance.",
            "params": [
                {
                    "name": "linkName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "from",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ ObjectValue }"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 109,
                "path": "src/linkutils/src/Shared/LinkUtils.lua"
            }
        },
        {
            "name": "getLinkValue",
            "desc": "Gets the first links value",
            "params": [
                {
                    "name": "linkName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "from",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ Instance }"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 129,
                "path": "src/linkutils/src/Shared/LinkUtils.lua"
            }
        },
        {
            "name": "promiseLinkValue",
            "desc": "Promises the first link value that is truthy",
            "params": [
                {
                    "name": "maid",
                    "desc": "",
                    "lua_type": "Maid"
                },
                {
                    "name": "linkName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "from",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<Instance>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 153,
                "path": "src/linkutils/src/Shared/LinkUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "LinkUtils",
    "desc": "Utility functions for links. Links are an [ObjectValue] pointing to something else!",
    "source": {
        "line": 5,
        "path": "src/linkutils/src/Shared/LinkUtils.lua"
    }
}