Skip to main content

BinderGroup

Groups binders together into a list, and allows binders to be dynamically added or removed.

Also allows their interface to be validated using a validation function. This ensures that all added objects are the same type, so they can be used for dynamic interactions.

Functions

new

BinderGroup.new(
binders{Binder<T>},--

A list of binders that

validateConstructor(constructorany) → boolean--

Validates a binder matches T

) → BinderGroup<T>

Constructs a new BinderGroup

AddList

BinderGroup.AddList(
selfBinderGroup,
binders{Binder<T>}
) → ()

Adds a list of binders to the group.

Add

BinderGroup.Add(
selfBinderGroup,
binderBinder<T>
) → ()

Adds the specific binder to the list

GetBinders

BinderGroup.GetBinders(selfBinderGroup) → {Binder.Binder<any>}

Returns a list of binders.

WARNING

Do not modify the list of binders returned here

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new BinderGroup",
            "params": [
                {
                    "name": "binders",
                    "desc": "A list of binders that",
                    "lua_type": "{ Binder<T> }"
                },
                {
                    "name": "validateConstructor",
                    "desc": "Validates a binder matches T",
                    "lua_type": "(constructor: any) -> boolean"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "BinderGroup<T>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 40,
                "path": "src/binder/src/Shared/BinderGroup.lua"
            }
        },
        {
            "name": "AddList",
            "desc": "Adds a list of binders to the group.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "BinderGroup"
                },
                {
                    "name": "binders",
                    "desc": "",
                    "lua_type": "{ Binder<T> }"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 59,
                "path": "src/binder/src/Shared/BinderGroup.lua"
            }
        },
        {
            "name": "Add",
            "desc": "Adds the specific binder to the list",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "BinderGroup"
                },
                {
                    "name": "binder",
                    "desc": "",
                    "lua_type": "Binder<T>"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 74,
                "path": "src/binder/src/Shared/BinderGroup.lua"
            }
        },
        {
            "name": "GetBinders",
            "desc": "Returns a list of binders.\n\n:::warning\nDo not modify the list of binders returned here\n:::",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "BinderGroup"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ Binder.Binder<any> }"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 101,
                "path": "src/binder/src/Shared/BinderGroup.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "BinderGroup",
    "desc": "Groups binders together into a list, and allows binders to be dynamically\nadded or removed.\n\nAlso allows their interface to be validated using a validation function.\nThis ensures that all added objects are the same type, so they can be used\nfor dynamic interactions.",
    "source": {
        "line": 12,
        "path": "src/binder/src/Shared/BinderGroup.lua"
    }
}