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.
SerialSession public surface, role of state$ / errors$, minimal sampledisconnect$ / dispose$ and where to unsubscribe (Angular, React, Vue, Svelte, Vanilla TS)lines$ / receive$, serialize commandsSerialError, type supplements, swappable SerialSession contract, supported data (text / binary / charset) (not a TypeDoc substitute)receiveBytes$ (not implemented)SerialSession, Vitest examples, DI injection (not published on npm)When migrating existing code:
receiveReplay$, isBrowserSupported(), options cleanup)state$ discriminated union, SerialSessionStatus, context.cause| 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 connectederrors$ — 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 supportdestroy$, isConnected$, portInfo$, getPortInfo(), getCurrentPort(), receiveReplay$, isBrowserSupported()) are documented in Migrating to v4