Skip to main content
Version: v8.0.0

createSocketConfiguration

Type-safe factory for creating socket SDK configuration maps.


Import
import { createSocketConfiguration } from "@hyper-fetch/sockets"

Usage

const config = createSocketConfiguration<MyChatSchema>()({
"*": { options: { reconnect: true } },
"chat.messages.$listener": (instance) => instance.setOptions({ buffer: true }),
})

Parameters

createSocketConfiguration<Schema>()

Returns

(defaults: SocketSdkConfigurationMap<Schema>) => SocketSdkConfigurationMap<Schema>