ably-js
ably-js copied to clipboard
Fix the signature of `ProtocolMessage.serialize`
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
inWebSocketTransport
(not sure exactly why, but I’m guessing something to do with the upgrade to thews
library inmain
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 ofProtocolMessage.serialize
is also a bit dodgy (it refers toBuffer
even though the code that uses it is also called on web).
➤ Automation for Jira commented:
The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3933