Skip to main content
Version: 3.x.x

SocketOptionsType


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

Description

Defined in socket/socket.types.ts:9

Preview

type SocketOptionsType<SocketAdapterType> = {
adapter: SocketAdapterType;
auth: QueryParamsType;
autoConnect: boolean;
queryParams: QueryParamsType | string;
queryParamsConfig: QueryStringifyOptionsType;
queryParamsStringify: StringifyCallbackType;
reconnect: number;
reconnectTime: number;
url: string;
}

Structure

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