Skip to main content
Version: 2.x.x

SocketConfigBaseType


import { SocketConfigBaseType } from "@hyper-fetch/sockets"

Description

Defined in socket/socket.types.ts:9

Preview

type SocketConfigBaseType<SocketClientType> = {
auth: ClientQueryParamsType;
autoConnect: boolean;
client: SocketClientType;
queryParams: ClientQueryParamsType | string;
queryParamsConfig: QueryStringifyOptions;
queryParamsStringify: StringifyCallbackType;
reconnect: number;
reconnectTime: number;
url: string;
}

Structure

{
auth: Record<string, ClientQueryParam>;
autoConnect: boolean;
client: SocketClientType;
queryParams: Record<string, ClientQueryParam> | string;
queryParamsConfig: {
arrayFormat: bracket | index | comma | separator | bracket-separator | none;
arraySeparator: string;
encode: boolean;
skipEmptyString: boolean;
skipNull: boolean;
strict: boolean;
};
queryParamsStringify: (queryParams: ClientQueryParamsType | string | NegativeTypes) => string;
reconnect: number;
reconnectTime: number;
url: string;
}