web-serial-rxjs API Documentation
    Preparing search index...

    English Guide

    Hand-written Markdown Guide for using @gurezo/web-serial-rxjs. For exhaustive public API types, parameters, and return values, see the English TypeDoc API Reference.

    The canonical documentation layout is defined in ARCHITECTURE.md.

    1. OverviewSerialSession public surface, role of state$ / errors$, minimal sample
    2. Quick Start — installation, connect, receive/send, disconnect/dispose, error handling
    3. Framework session lifecycle — when to disconnect$ / dispose$ and where to unsubscribe (Angular, React, Vue, Svelte, Vanilla TS)
    4. Browser support and support policy — Web Serial API availability vs official support
    5. Version support and release policy — SemVer, deprecations, support window (no LTS)
    6. Bundler and framework compatibility — CI checks vs Example builds; ESM / RxJS / types baseline (no full matrix)
    7. Bundle size and tree-shaking — reproducible library-only size snapshot; measurement procedure
    8. Verified environment listing criteria — minimum fields if hardware results are published (not a device catalog)
    9. Choosing receive$ / lines$ / terminalText$ — pick the receive stream by use case
    10. Communication pattern Recipes — find Guide pages by serial goal (line protocol, command/reply, timeout, …)
    11. Advanced Usage — line framing, derived streams, recovery
    12. Request / Response — wait for replies on lines$ / receive$, serialize commands
    13. Timeout / cancel / retry — deadlines, teardown cancel, bounded retry (no core auto-retry)
    14. API concepts and design notes — options tables, SerialError, type supplements, swappable SerialSession contract, supported data (text / binary / charset) (not a TypeDoc substitute)
    15. Binary receive API — design decision — go / no-go for a future receiveBytes$ (not implemented)
    16. Hardware-free testing — Fake SerialSession, Vitest examples, DI injection (not published on npm)
    17. Troubleshooting — common Web Serial / session problems, self-help checks, and Error Recovery Matrix

    When migrating existing code:

    Document Use it for
    Overview Public surface quick reference, feature summary, minimal sample
    Quick Start Basic flow from installation through disconnect
    Framework session lifecycle disconnect$ / dispose$ timing and subscription cleanup by framework
    Browser support and support policy API availability vs official support / untested
    Version support and release policy SemVer, deprecations, support window (no LTS)
    Bundler and framework compatibility CI vs Examples; ESM / RxJS / types (no full bundler matrix)
    Bundle size and tree-shaking Library-only size snapshot and reproducible measurement
    Verified environment listing criteria Minimum verification fields for hardware results (no device catalog)
    Choosing receive$ / lines$ / terminalText$ Decision guide for the three receive streams
    Communication pattern Recipes Pattern → Guide / Recipe index (not device compatibility)
    Advanced Usage Application patterns and RxJS recipes
    Request / Response Command + matching reply on lines$ / receive$ (no core request$)
    Timeout / cancel / retry Timeouts, cancel on teardown, limited retry (no core auto-retry)
    API concepts and design notes Options, error codes, type tables, swappable SerialSession contract, supported data
    Binary receive API — design decision Design review: defer receiveBytes$; go / no-go criteria
    Hardware-free testing Controllable Fake SerialSession, Vitest / Angular / React examples (npm: not bundled)
    Troubleshooting Common problems, check steps, Recovery Matrix, and what to report
    v3 → v4 Migration Unified Phase 1+2 public API cleanup
    v2 → v3 Migration Steps to adopt v3 canonical API
    v1 → v2 Migration Replacements for removed v1 APIs
    Phase 5 (archive) Legacy v1 documentation reference
    • state$ — canonical lifecycle source. Branch on state.status with SerialSessionStatus; use state.portInfo when connected
    • errors$ — canonical fatal / non-fatal error event channel. Branch with SerialError.is(SerialErrorCode.*)
    • dispose$() — sole session teardown API (subscribe to run it)
    • isWebSerialSupported() — top-level sync feature detection (not a session method; not a support guarantee) — see Browser support
    • Phase 1+2 removals (destroy$, isConnected$, portInfo$, getPortInfo(), getCurrentPort(), receiveReplay$, isBrowserSupported()) are documented in Migrating to v4