feat: add legacy connection

This commit is contained in:
Adhiraj Singh
2021-12-17 19:27:04 +05:30
parent 13b49e658d
commit 19a9980492
23 changed files with 2402 additions and 103 deletions

14
src/LegacySocket/index.ts Normal file
View File

@@ -0,0 +1,14 @@
import { LegacySocketConfig } from '../Types'
import { DEFAULT_LEGACY_CONNECTION_CONFIG } from '../Defaults'
import _makeConnection from './groups'
// export the last socket layer
const makeConnection = (config: Partial<LegacySocketConfig>) => (
_makeConnection({
...DEFAULT_LEGACY_CONNECTION_CONFIG,
...config
})
)
export type Connection = ReturnType<typeof makeConnection>
export default makeConnection