Cleanup + add remaining utils

This commit is contained in:
Adhiraj Singh
2021-07-12 23:50:08 +05:30
parent 89cf8004e9
commit 71e34fc5f8
15 changed files with 234 additions and 74 deletions
+5 -2
View File
@@ -1,12 +1,15 @@
import { SocketConfig } from '../Types'
import { DEFAULT_CONNECTION_CONFIG } from '../Defaults'
import { EventEmitter } from 'events'
import * as Connection from './groups'
import _makeConnection from './groups'
// export the last socket layer
const makeConnection = (config: Partial<SocketConfig>) => (
Connection.default({
_makeConnection({
...DEFAULT_CONNECTION_CONFIG,
...config
})
)
export type Connection = ReturnType<typeof makeConnection>
export default makeConnection