---
source: tests/test-inputs.rs
expression: stdout
---
[
{
"functions": [
{
"name": "new",
"desc": "Creates a new instance of Fabric.",
"params": [
{
"name": "namespace",
"desc": "A unique namespace to distinguish from other instances of Fabric for network calls.",
"lua_type": "string"
}
],
"returns": [
{
"desc": "",
"lua_type": "Fabric"
}
],
"function_type": "static",
"source": {
"line": 66,
"path": ""
}
},
{
"name": "registerUnit",
"desc": "Registers a unit. This function should be called before attempting to get or create the unit.",
"params": [
{
"name": "unitDefinition",
"desc": "The definition of the unit",
"lua_type": "UnitDefinition"
}
],
"returns": [
{
"desc": "The passed unit definition",
"lua_type": "UnitDefinition"
}
],
"function_type": "method",
"source": {
"line": 89,
"path": ""
}
},
{
"name": "registerUnitsIn",
"desc": "Registers all units that are immmediate children of a container.\nSkips any test scripts (i.e. name of form `*.spec`) in the container.",
"params": [
{
"name": "container",
"desc": "The container",
"lua_type": "Instance"
}
],
"returns": [
{
"desc": "",
"lua_type": "nil"
}
],
"function_type": "method",
"source": {
"line": 105,
"path": ""
}
},
{
"name": "getUnitByRef",
"desc": "Returns the unit associated with a unit resolvable that is attached to a ref,\nor nil if it doesn't exist.",
"params": [
{
"name": "unitResolvable",
"desc": "The unit to retrieve",
"lua_type": "UnitResolvable"
},
{
"name": "ref",
"desc": "The ref to retrieve the unit from",
"lua_type": "Ref"
}
],
"returns": [
{
"desc": "The attached unit",
"lua_type": "Unit?"
}
],
"function_type": "method",
"source": {
"line": 135,
"path": ""
}
},
{
"name": "getOrCreateUnitByRef",
"desc": "Returns the unit associated with a unit resolvable that is attached to ref.\nIf it does not exist, then creates and attaches the unit to ref and returns it.",
"params": [
{
"name": "unitResolvable",
"desc": "The unit to retrieve",
"lua_type": "UnitResolvable"
},
{
"name": "ref",
"desc": "The ref to retrieve the attached unit from",
"lua_type": "Ref"
}
],
"returns": [
{
"desc": "The attached unit",
"lua_type": "Unit"
}
],
"function_type": "method",
"source": {
"line": 147,
"path": ""
}
},
{
"name": "removeAllUnitsWithRef",
"desc": "Removes all units attached to the passed ref.",
"params": [
{
"name": "ref",
"desc": "The ref to remove all units from",
"lua_type": "Ref"
}
],
"returns": [
{
"desc": "",
"lua_type": "nil"
}
],
"function_type": "method",
"source": {
"line": 190,
"path": ""
}
},
{
"name": "fire",
"desc": "Fires a fabric event.",
"params": [
{
"name": "eventName",
"desc": "The event name to fire",
"lua_type": "string"
},
{
"name": "...",
"desc": "The arguments to fire the event with.",
"lua_type": "any"
}
],
"returns": [
{
"desc": "",
"lua_type": "nil"
}
],
"function_type": "method",
"source": {
"line": 201,
"path": ""
}
},
{
"name": "on",
"desc": "Listens to a fabric event.",
"params": [
{
"name": "eventName",
"desc": "The event name to listen to",
"lua_type": "string"
},
{
"name": "callback",
"desc": "The callback fired",
"lua_type": "function"
}
],
"returns": [
{
"desc": "",
"lua_type": "nil"
}
],
"function_type": "method",
"source": {
"line": 225,
"path": ""
}
},
{
"name": "debug",
"desc": "Logs a debug message. Set fabric.DEBUG = true to enable.",
"params": [
{
"name": "...",
"desc": "The debug information to log",
"lua_type": "any"
}
],
"returns": [
{
"desc": "",
"lua_type": "nil"
}
],
"function_type": "method",
"source": {
"line": 245,
"path": ""
}
}
],
"properties": [
{
"name": "reducers",
"desc": "This is a property that is set to the reducers.",
"lua_type": "Reducers",
"readonly": true,
"source": {
"line": 45,
"path": ""
}
}
],
"types": [
{
"name": "stringOrNil",
"desc": "A string or nil.",
"lua_type": "string | nil",
"source": {
"line": 25,
"path": ""
}
},
{
"name": "Instance",
"desc": "A Roblox Instance.",
"fields": [
{
"name": "Name",
"lua_type": "string",
"desc": "A name for this Instance."
},
{
"name": "ClassName",
"lua_type": "string",
"desc": "The class name for this"
},
{
"name": "CollisionGroup",
"lua_type": "number",
"desc": ""
},
{
"name": "Blargh",
"lua_type": "boolean",
"desc": "This uses @field explicitly"
}
],
"source": {
"line": 37,
"path": ""
}
}
],
"name": "Fabric",
"desc": "-.reducers Reducers -- This is a property that is set to the reducers.",
"source": {
"line": 18,
"path": ""
}
}
]