

# SocketOptionsType

<div class="api-docs__separator" data-reactroot="">

---

</div><div class="api-docs__import" data-reactroot="">

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

</div><div class="api-docs__section">

## Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [socket/socket.types.ts:9](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/sockets/src/socket/socket.types.ts#L9)

</p><div class="api-docs__section">

## Preview

</div><div class="api-docs__preview type">

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

</div><div class="api-docs__section">

## Structure

</div><div class="api-docs__returns">

```ts
{
  adapter: SocketAdapterType;
  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;
}
```

</div>