mpetazzoni/sse.js

removed constructor in 2.4.0? can not build

Closed this issue · 2 comments

Hi, I can not build my project after auto-update to 2.4.0. If I'm watching correctly, you removed constructor, so var source = new SSE(url, options); is not possible to call. Was the change really intended?

We're seeing the same issue in our Dependabot PR, caused by this constructor call.

error TS2351: This expression is not constructable.
  Type 'SSE' has no construct signatures.

Sorry about this issue, I've published a 2.4.1 release that brings the constructor back into the type definition. I don't fully understand yet why tsc removes it on build – I'll dig into that separately.