Commit graph

4 commits

Author SHA1 Message Date
Manuel Bahamóndez-Honores
2d4cb35e51 Replace hand-written .d.ts with JSDoc + tsc auto-generation
- Delete hand-written index.d.ts that drifted from source
- Add JSDoc type annotations to all source files
- Create src/types.js with shared typedefs (SelfInfo, Contact,
  ContactMessage, ChannelInfo, RepeaterStats, etc.)
- Add tsconfig.json for declaration generation
- Add build:types script and prepublishOnly hook
- Add GitHub Actions CI workflow for type checking
- Use Uint8Array everywhere (no Buffer references)
- Add semantic type aliases (EpochSeconds, Milliseconds, MilliVolts)
- Add typed event overloads on Connection (on/once/off)
- All 11 PR #15 review comments addressed
2026-02-18 05:49:46 -03:00
liamcottle
9a979df471 Revert "Fix race condition in WebBleConnection"
This reverts commit 78a003767f.
2026-01-23 23:05:22 +13:00
Michael Lynch
78a003767f Fix race condition in WebBleConnection
WebBleConnection's constructor calls init(), which is async. Constructors can't be async, so this means that callers who instantiate WebBleConnection can end up with it in an invalid state after construction if init() hasn't completed by the time the caller tries to access class members that depend on init.

I think the cleaner solution is to push the init() call to open(), which is async, so it can just await the results of init(), and the caller can trust that after calling open(), the connection is fully initialized.
2026-01-01 19:23:47 -05:00
liamcottle
06f8f9d4ea refactor ble connection to web ble connection 2025-04-08 13:54:25 +12:00
Renamed from src/connection/ble_connection.js (Browse further)