<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [setQuery](./x-components.setquery.md)

## setQuery() function

Sets the query of the module.

**Signature:**

```typescript
export declare function setQuery(state: QueryState, query: string): void;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

state


</td><td>

[QueryState](./x-components.querystate.md)


</td><td>

State of the module.


</td></tr>
<tr><td>

query


</td><td>

string


</td><td>

The new query to set.


</td></tr>
</tbody></table>

**Returns:**

void

