Show raw api
{
"functions": [
{
"name": "Add",
"desc": "Adds the remote function mixin to a class\n\n```lua\nlocal BaseObject = require(\"BaseObject\")\n\nlocal Bird = setmetatable({}, BaseObject)\nBird.ClassName = \"Bird\"\nBird.__index = Bird\n\nrequire(\"PromiseRemoteFunctionMixin\"):Add(Bird, \"BirdRemoteFunction\")\n\nfunction Bird.new(inst)\n\tlocal self = setmetatable(BaseObject.new(inst), Bird)\n\n\tself:PromiseRemoteFunction():Then(function(remoteFunction)\n\t\ttask.spawn(function()\n\t\t\tremoteFunction:InvokeServer() -- or whatever\n\t\tend)\n\tend)\n\n\treturn self\nend\n```",
"params": [
{
"name": "class",
"desc": "",
"lua_type": "{ _maid: Maid }"
},
{
"name": "remoteFunctionName",
"desc": "",
"lua_type": "string"
}
],
"returns": [],
"function_type": "method",
"source": {
"line": 40,
"path": "src/remoting/src/Shared/PromiseRemoteFunctionMixin.lua"
}
},
{
"name": "PromiseRemoteFunction",
"desc": "Returns a promise that returns a remote function",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Promise<RemoteFunction>"
}
],
"function_type": "method",
"source": {
"line": 54,
"path": "src/remoting/src/Shared/PromiseRemoteFunctionMixin.lua"
}
}
],
"properties": [],
"types": [],
"name": "PromiseRemoteFunctionMixin",
"desc": "Intended for classes that extend BaseObject only",
"source": {
"line": 5,
"path": "src/remoting/src/Shared/PromiseRemoteFunctionMixin.lua"
}
}