versatica / JsSIP

JsSIP, the JavaScript SIP library
https://jssip.net
Other
2.4k stars 739 forks source link

Fix type definitions to not import `Listener` from `events` (fixes: #799) #837

Closed jlaine closed 10 months ago

jlaine commented 10 months ago

The type definitions provided by @types/events clash with those by @types/node, resulting in the error:

     Module '"events"' has no exported member 'Listener'.

In practice this makes it impossible to use JsSIP in any Angular project, resulting in issues such as #799.

Looking at the places where Listener is being imported, we are not gaining anything by using this type definition which is extremely generic. We can do better by using a more specific type definition.

jmillan commented 10 months ago

Makes sense, thanks @jlaine :+1: