ably-js icon indicating copy to clipboard operation
ably-js copied to clipboard

Fix the signature of `ProtocolMessage.serialize`

Open lawrence-forooghian opened this issue 8 months ago • 1 comments

See description of #1480, in which I had to add a type assertion to get around the signature of serialize:

Fixing a newly-introduced compilation error calling wsConnection.send in WebSocketTransport (not sure exactly why, but I’m guessing something to do with the upgrade to the ws library in main and perhaps some changes to TypeScript version in v2) — the fix, which uses a type assertion to always pretend we’re always in the Node case, is a bit dodgy but that’s because the signature of ProtocolMessage.serialize is also a bit dodgy (it refers to Buffer even though the code that uses it is also called on web).

┆Issue is synchronized with this Jira Task by Unito

lawrence-forooghian avatar Nov 06 '23 19:11 lawrence-forooghian

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3933

sync-by-unito[bot] avatar Nov 06 '23 19:11 sync-by-unito[bot]