{
  "classes": [
    {
      "constants": [],
      "types": [
        {
          "lua_type": "type Stream = ReadableStream\n    | WritableStream\n    | ReadWriteStream",
          "name": "Stream",
          "tags": [],
          "source": {
            "path": "",
            "line": 90
          },
          "fields": [],
          "desc": "Union of all stream capability variants."
        }
      ],
      "name": "@eryx/stream",
      "tags": [],
      "functions": [],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": "Shared stream contracts for Eryx.\n\nThis module provides:\n\n1. Structural stream types (`ReadableStream`, `WritableStream`,\n   `ReadWriteStream`, and `Stream`) for static typing.\n\n## Design intent\n\n- Native objects should \"just be streams\" by shape, not inheritance.\n  `fs.File`, `_socket.Socket`, and `_ssl.SslSocket` can satisfy these\n  contracts directly via structural typing.\n- Capabilities are represented in types with tags:\n  `readable: true/false` and `writable: true/false`.\n- Runtime compatibility is preserved: some concrete objects may still\n  expose methods that can error when capability is invalid.\n\n## Return conventions\n\n- `nil` means EOF (or closed peer for read-like operations).\n- Socket-specific would-block signaling is exposed by `@eryx/_socket`\n  via `_socket.WOULD_BLOCK`, not this shared module.\n\n## Quick examples\n\nUse `@eryx/stdio` for process-owned stream handles:\n- `stdio.stdin`\n- `stdio.stdout`\n- `stdio.stderr`\n"
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 42
      },
      "tags": [],
      "properties": [
        {
          "tags": [],
          "lua_type": "readable: true",
          "name": "readable",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "writable: false",
          "name": "writable",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "closed: boolean?",
          "name": "closed",
          "desc": ""
        }
      ],
      "desc": "Read-only stream contract.\n\n`read` and `readSync` are intentionally generic and may return either\n`string` or `buffer` depending on the concrete stream source.\nUse `readBuffer` variants when you specifically need `buffer`.\n",
      "name": "ReadableStream",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 46
          },
          "is_method": true,
          "signature": "ReadableStream:read(size: number?) → string | nil",
          "desc": "",
          "tags": [],
          "name": "read",
          "return_str": "string | nil",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string | nil",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "number?",
              "name": "size",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 47
          },
          "is_method": true,
          "signature": "ReadableStream:readSync(size: number?) → string | nil",
          "desc": "",
          "tags": [],
          "name": "readSync",
          "return_str": "string | nil",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string | nil",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "number?",
              "name": "size",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 48
          },
          "is_method": true,
          "signature": "ReadableStream:readBuffer(size: number?) → buffer | nil",
          "desc": "",
          "tags": [],
          "name": "readBuffer",
          "return_str": "buffer | nil",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "buffer | nil",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "number?",
              "name": "size",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 49
          },
          "is_method": true,
          "signature": "ReadableStream:readBufferSync(size: number?) → buffer | nil",
          "desc": "",
          "tags": [],
          "name": "readBufferSync",
          "return_str": "buffer | nil",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "buffer | nil",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "number?",
              "name": "size",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 50
          },
          "is_method": true,
          "signature": "ReadableStream:close() → ()",
          "desc": "",
          "tags": [],
          "name": "close",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 51
          },
          "is_method": true,
          "signature": "ReadableStream:closeSync() → ()",
          "desc": "",
          "tags": [],
          "name": "closeSync",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        }
      ],
      "metamethods": [],
      "types": []
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 60
      },
      "tags": [],
      "properties": [
        {
          "tags": [],
          "lua_type": "readable: false",
          "name": "readable",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "writable: true",
          "name": "writable",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "closed: boolean?",
          "name": "closed",
          "desc": ""
        }
      ],
      "desc": "Write-only stream contract.\n\n`write` and `writeSync` accept `string | buffer` to support both text and\nbinary producer code with one surface.\n",
      "name": "WritableStream",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 64
          },
          "is_method": true,
          "signature": "WritableStream:write(data: string | buffer) → number",
          "desc": "",
          "tags": [],
          "name": "write",
          "return_str": "number",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string | buffer",
              "name": "data",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 65
          },
          "is_method": true,
          "signature": "WritableStream:writeSync(data: string | buffer) → number",
          "desc": "",
          "tags": [],
          "name": "writeSync",
          "return_str": "number",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string | buffer",
              "name": "data",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 66
          },
          "is_method": true,
          "signature": "WritableStream:close() → ()",
          "desc": "",
          "tags": [],
          "name": "close",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 67
          },
          "is_method": true,
          "signature": "WritableStream:closeSync() → ()",
          "desc": "",
          "tags": [],
          "name": "closeSync",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        }
      ],
      "metamethods": [],
      "types": []
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 75
      },
      "tags": [],
      "properties": [
        {
          "tags": [],
          "lua_type": "readable: true",
          "name": "readable",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "writable: true",
          "name": "writable",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "closed: boolean?",
          "name": "closed",
          "desc": ""
        }
      ],
      "desc": "Duplex stream contract.\n\nThis is effectively `ReadableStream & WritableStream` with explicit tags.\n",
      "name": "ReadWriteStream",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 79
          },
          "is_method": true,
          "signature": "ReadWriteStream:read(size: number?) → string | nil",
          "desc": "",
          "tags": [],
          "name": "read",
          "return_str": "string | nil",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string | nil",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "number?",
              "name": "size",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 80
          },
          "is_method": true,
          "signature": "ReadWriteStream:readSync(size: number?) → string | nil",
          "desc": "",
          "tags": [],
          "name": "readSync",
          "return_str": "string | nil",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string | nil",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "number?",
              "name": "size",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 81
          },
          "is_method": true,
          "signature": "ReadWriteStream:readBuffer(size: number?) → buffer | nil",
          "desc": "",
          "tags": [],
          "name": "readBuffer",
          "return_str": "buffer | nil",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "buffer | nil",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "number?",
              "name": "size",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 82
          },
          "is_method": true,
          "signature": "ReadWriteStream:readBufferSync(size: number?) → buffer | nil",
          "desc": "",
          "tags": [],
          "name": "readBufferSync",
          "return_str": "buffer | nil",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "buffer | nil",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "number?",
              "name": "size",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 83
          },
          "is_method": true,
          "signature": "ReadWriteStream:write(data: string | buffer) → number",
          "desc": "",
          "tags": [],
          "name": "write",
          "return_str": "number",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string | buffer",
              "name": "data",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 84
          },
          "is_method": true,
          "signature": "ReadWriteStream:writeSync(data: string | buffer) → number",
          "desc": "",
          "tags": [],
          "name": "writeSync",
          "return_str": "number",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string | buffer",
              "name": "data",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 85
          },
          "is_method": true,
          "signature": "ReadWriteStream:close() → ()",
          "desc": "",
          "tags": [],
          "name": "close",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 86
          },
          "is_method": true,
          "signature": "ReadWriteStream:closeSync() → ()",
          "desc": "",
          "tags": [],
          "name": "closeSync",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        }
      ],
      "metamethods": [],
      "types": []
    }
  ]
}