# ClientStorage.set
Stores a value in client storage.

{/* Do not edit this file. It is automatically generated by API Documenter. */}

## ClientStorage.set() method

Stores a value in client storage.

**Signature:**

```typescript
set(key: string, value: unknown): Promise<void>;
```

## Parameters

<table>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        key
      </td>

      <td>
        string
      </td>

      <td>
        The storage key
      </td>
    </tr>

    <tr>
      <td>
        value
      </td>

      <td>
        unknown
      </td>

      <td>
        The value to store. Can be booleans, numbers, strings, dates, objects, arrays, regexps, undefined, or null.
      </td>
    </tr>
  </tbody>
</table>

**Returns:**

Promise\<void>

A promise that resolves when the value is stored

## Remarks

Will throw an error if storing this value would exceed the plugin's storage quota

## Example

```ts
await creator.clientStorage.set("theme", "dark");
```
