Conversation
|
How i got perf_hooks working ^ |
| }; | ||
|
|
||
| protected handleSocketError = (err: Error) => { | ||
| protected handleSocketError = (err: any) => { |
There was a problem hiding this comment.
Because the cause can either be an Error or an event. It doesn't rlly matter what this value is, as it's just set as the cause of the thrown error
There was a problem hiding this comment.
Using any type tends to be pretty hacky. Generally if the type isn't well defined and it doesn't really matter then unknown can be used instead of any.
While any can be anything and assigned to anything. unknown could be anything but can't be assigned to anything else. So it's safer to use. https://stackoverflow.com/questions/51439843/unknown-vs-any
That's a downstream thing right? Not something this repo would do. Because it produces an npm package. However you can update the readme to explain too. |
|
@CMCDragonkai yes, it would be something that downstream would have to do. Although, we can automatically apply the polyfill in js-timer directly if we want to. |
No we shouldn't preemptively polyfill. So readme it is. Did you read my review? |
Description
Allows
WebSocketClientandWebSocketConnectionto work with the browserWebSocketimplementation.To note some discoveries:
Bufferperf_hookswith the browserperformanceAPI to work with browsers.Issues Fixed
Tasks
WebSocketClientwork with browserWebSocketsWebSocketConnectionwork with browserWebSocketsWebSocketusingwslibrary.Final checklist