Moddable-OpenSource / moddable

Tools for developers to create truly open IoT products using standard JavaScript on low cost microcontrollers.
http://www.moddable.com
1.35k stars 238 forks source link

Typing improvements for `io` and fixes for `websocketclient`, and a few others #1429

Open cmidgley opened 1 month ago

cmidgley commented 1 month ago

This is the work I've done to date with io focused on making websocketclient to be reliable and strongly typed with TypeScript. It's a fairly substantial set of changes, mostly in the .d.ts files but some implementation (especially websocketclient).

Type changes:

Implementation changes:

I typed everything based on the current implementation and not ECMA-419 (many modules are inconsistent with the published 2nd edition of the spec).

cmidgley commented 1 month ago

Fixes are in place. Let me know what else you find..