Show raw api
{
"functions": [
{
"name": "new",
"desc": "Constructs a new CancelToken",
"params": [
{
"name": "executor",
"desc": "",
"lua_type": "(cancel: () -> ()) -> ()"
}
],
"returns": [
{
"desc": "",
"lua_type": "CancelToken"
}
],
"function_type": "static",
"source": {
"line": 25,
"path": "src/canceltoken/src/Shared/CancelToken.lua"
}
},
{
"name": "isCancelToken",
"desc": "Returns true if the value is a cancel token",
"params": [
{
"name": "value",
"desc": "",
"lua_type": "any"
}
],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 57,
"path": "src/canceltoken/src/Shared/CancelToken.lua"
}
},
{
"name": "fromMaid",
"desc": "Constructs a new CancelToken that cancels whenever the maid does.",
"params": [
{
"name": "maid",
"desc": "",
"lua_type": "Maid"
}
],
"returns": [
{
"desc": "",
"lua_type": "CancelToken"
}
],
"function_type": "static",
"source": {
"line": 67,
"path": "src/canceltoken/src/Shared/CancelToken.lua"
}
},
{
"name": "fromSeconds",
"desc": "Cancels after the set amount of seconds",
"params": [
{
"name": "seconds",
"desc": "",
"lua_type": "number"
}
],
"returns": [
{
"desc": "",
"lua_type": "CancelToken"
}
],
"function_type": "static",
"source": {
"line": 87,
"path": "src/canceltoken/src/Shared/CancelToken.lua"
}
},
{
"name": "ErrorIfCancelled",
"desc": "Errors if cancelled",
"params": [],
"returns": [],
"function_type": "method",
"source": {
"line": 98,
"path": "src/canceltoken/src/Shared/CancelToken.lua"
}
},
{
"name": "IsCancelled",
"desc": "Returns true if cancelled",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "method",
"source": {
"line": 108,
"path": "src/canceltoken/src/Shared/CancelToken.lua"
}
}
],
"properties": [],
"types": [],
"name": "CancelToken",
"desc": "Cancellation token",
"source": {
"line": 5,
"path": "src/canceltoken/src/Shared/CancelToken.lua"
}
}