Skip to main content

RemoteFunctionUtils

Utility functions to wrap invoking a remote function with a promise

Functions

promiseInvokeServer

RemoteFunctionUtils.promiseInvokeServer(
remoteFunctionRemoteFunction,
...any
) → Promise<T>

Invokes the server with the remote function call.

promiseInvokeClient

RemoteFunctionUtils.promiseInvokeClient(
remoteFunctionRemoteFunction,
playerInstance,
...any
) → Promise<T>

Invokes the client with the remote function call.

promiseInvokeBindableFunction

RemoteFunctionUtils.promiseInvokeBindableFunction(
bindableFunctionRemoteFunction,
...any
) → Promise<T>

Invokes the server with the remote function call.

fromPromiseYieldResult

RemoteFunctionUtils.fromPromiseYieldResult(
okboolean,
...any
) → Promise<T>

Converts a promise result into a promise

Show raw api
{
    "functions": [
        {
            "name": "promiseInvokeServer",
            "desc": "Invokes the server with the remote function call.",
            "params": [
                {
                    "name": "remoteFunction",
                    "desc": "",
                    "lua_type": "RemoteFunction"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<T>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 18,
                "path": "src/remotefunctionutils/src/Shared/RemoteFunctionUtils.lua"
            }
        },
        {
            "name": "promiseInvokeClient",
            "desc": "Invokes the client with the remote function call.",
            "params": [
                {
                    "name": "remoteFunction",
                    "desc": "",
                    "lua_type": "RemoteFunction"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Instance"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<T>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 48,
                "path": "src/remotefunctionutils/src/Shared/RemoteFunctionUtils.lua"
            }
        },
        {
            "name": "promiseInvokeBindableFunction",
            "desc": "Invokes the server with the remote function call.",
            "params": [
                {
                    "name": "bindableFunction",
                    "desc": "",
                    "lua_type": "RemoteFunction"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<T>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 77,
                "path": "src/remotefunctionutils/src/Shared/RemoteFunctionUtils.lua"
            }
        },
        {
            "name": "fromPromiseYieldResult",
            "desc": "Converts a promise result into a promise",
            "params": [
                {
                    "name": "ok",
                    "desc": "",
                    "lua_type": "boolean"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<T>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 107,
                "path": "src/remotefunctionutils/src/Shared/RemoteFunctionUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "RemoteFunctionUtils",
    "desc": "Utility functions to wrap invoking a remote function with a promise",
    "source": {
        "line": 5,
        "path": "src/remotefunctionutils/src/Shared/RemoteFunctionUtils.lua"
    }
}