SocketOptionsType
import { SocketOptionsType } from "@hyper-fetch/sockets"
Description
Defined in socket/socket.types.ts:9
Preview
type SocketOptionsType<AdapterType> = {
adapter: AdapterType;
adapterOptions: ExtractSocketOptionsType<AdapterType>;
auth: QueryParamsType;
autoConnect: boolean;
queryParams: QueryParamsType | string;
queryParamsConfig: QueryStringifyOptionsType;
queryParamsStringify: StringifyCallbackType;
reconnect: number;
reconnectTime: number;
url: string;
}
Structure
{
adapter: AdapterType;
adapterOptions: T extends SocketAdapterType<infer O, any, any, any> ? O : never;
auth: Record<string, QueryParamType>;
autoConnect: boolean;
queryParams: Record<string, QueryParamType> | string;
queryParamsConfig: {
arrayFormat: bracket | index | comma | separator | bracket-separator | none;
arraySeparator: string;
dateParser: (value: QueryParamType) => string;
encode: boolean;
objectParser: (value: QueryParamType) => string;
skipEmptyString: boolean;
skipNull: boolean;
strict: boolean;
};
queryParamsStringify: (queryParams: QueryParamsType | string | NegativeTypes) => string;
reconnect: number;
reconnectTime: number;
url: string;
}