Closed croes closed 7 years ago
The code that handled NodeJS was quite old and not well maintained. In last month I have cleaned up quite a lot of that code. It no longer needs setInterval
and clearInterval
.
Please use the master version, in that I have removed all the offending lines. The master version is refactored and is not same as currently released.
If it still does not work, please let me know. You are welcome to fork it, and make a pull request :)
@kum-deepak , the updated typescript definition works perfectly :+1:
Any ETA when this fix will be available in a release on NPM?
I was out of country so did not want to push then. I am back, so, today or tomorrow.
Confirmed fixed in 3.1.1.
Thanks for handling this issue so swiftly! :+1:
Planning for next version of stompjs is on the way. Your participation will be really appreciated, please join at https://github.com/stomp-js/stompjs/issues/1
I'm using stompjs in a Typescript project targeting the browser. The typescript compiler complains that it can't find the node types referenced in stompjs' TS definition:
This makes sense, I'm not including the node types as I'm targeting the browser. Unfortunately, the return type of
setInterval
is different between a browser environment (just anumber
) and a node environment (a more complexNodeJS.Timer
object).Is there a good reason Stomp exports
setInterval
andclearInterval
? Could these be removed from the TS definition?