{
  "classes": [
    {
      "constants": [],
      "types": [],
      "name": "@eryx/task",
      "tags": [],
      "functions": [
        {
          "source": {
            "path": "",
            "line": 22
          },
          "is_method": false,
          "signature": "task.spawn<A..., R...>(functionOrThread: (((A...) → R...)) | thread, ...) → thread",
          "owner": "task",
          "desc": "",
          "tags": [],
          "name": "spawn",
          "return_str": "thread",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "thread",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "(((A...) → R...)) | thread",
              "name": "functionOrThread",
              "desc": ""
            },
            {
              "lua_type": "",
              "name": "...",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 25
          },
          "is_method": false,
          "signature": "task.defer<A..., R...>(functionOrThread: (((A...) → R...)) | thread, ...) → thread",
          "owner": "task",
          "desc": "",
          "tags": [],
          "name": "defer",
          "return_str": "thread",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "thread",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "(((A...) → R...)) | thread",
              "name": "functionOrThread",
              "desc": ""
            },
            {
              "lua_type": "",
              "name": "...",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 28
          },
          "is_method": false,
          "signature": "task.delay<A..., R...>(duration: number?, functionOrThread: (((A...) → R...)) | thread, ...) → thread",
          "owner": "task",
          "desc": "",
          "tags": [],
          "name": "delay",
          "return_str": "thread",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "thread",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "number?",
              "name": "duration",
              "desc": ""
            },
            {
              "lua_type": "(((A...) → R...)) | thread",
              "name": "functionOrThread",
              "desc": ""
            },
            {
              "lua_type": "",
              "name": "...",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 31
          },
          "is_method": false,
          "signature": "task.wait(duration: number?) → number",
          "owner": "task",
          "desc": "",
          "tags": [],
          "name": "wait",
          "return_str": "number",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "number?",
              "name": "duration",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 34
          },
          "is_method": false,
          "signature": "task.cancel(t: thread) → ()",
          "owner": "task",
          "desc": "",
          "tags": [],
          "name": "cancel",
          "return_str": "",
          "function_type": "Function",
          "returns": [],
          "params": [
            {
              "lua_type": "thread",
              "name": "t",
              "desc": ""
            }
          ]
        }
      ],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": "Roblox-compatible task scheduling library backed by libuv timers.\n\n**Example:**\n```luau\nlocal task = require(\"@eryx/task\")\n\ntask.spawn(function()\n\tprint(\"tick 1\")\n\tlocal dt = task.wait(1)\n\tprint(\"tick 2 after\", dt, \"s\")\nend)\n```\n\nWhen the top-level script yields, the libuv event loop drives timer\ncallbacks that resume coroutines automatically - no manual `task.step()`\ncall is required (though it is still available for backward compatibility).\n"
    }
  ]
}