It doesn't get translated in the TS build, for one.
Script I used:
```python
import os
for (dirpath, dirnames, filenames) in os.walk('.'):
if '.git' in dirpath:
continue
if 'node_modules' in dirpath:
continue
if 'dist' in dirpath:
continue
if 'types' in dirpath:
continue
for filename in filenames:
path = os.path.join(dirpath, filename)
if not path.endswith('.js') and not path.endswith('.ts'):
continue
#print(path)
with open(path, 'r+') as f:
#print(f)
data = f.read()
if '__filename' in data:
p, ext = os.path.splitext(path)
txt = f"'{p[2:]}'"
print(txt)
data = data.replace('__filename', txt) # Assign the result back to data
f.seek(0)
f.write(data)
f.truncate()
```
Unify events and output single TypeScript declaration (#2407)
* fix(events): unify events to a single EventManager type, add support for single typescript declaration
* fix(lint): fix lint
* fix(events): fix incorrect instatiation
* fix(events): clean up redundant methods
* fix(events): keep EventEmitter name, alias NodeEventEmitter
* fix(events): fix loose reference
* fix(EventEmitter): remove on/off alias as redundant
* fix(RTCUtils): bring event handlers under class to use same event emitter
* fix(RTCUtils): fix lint
The XmppConnection will try to resume the connection
only when the internet is online. This speeds up the process
by avoiding unnecessary connect attempts while offline as each
failed attempt increases the backoff delay.