# InMemoryStore

**Kind**: interface | **Module**: [App Management](https://docs.interop.io/desktop/reference/javascript/app%20management/index.md) | **Access**: `io.appManager.inMemory`

**Source**: https://docs.interop.io/desktop/reference/javascript/app management/inmemorystore/index.html

API for handling app definitions at runtime. The API methods operate only on in-memory app definitions.

## Methods

### clear

Removes all app definitions from the in-memory store.

```ts
() => Promise<void>
```

**Returns**: `Promise<void>`

### export

Exports all available app definitions from the in-memory store.

```ts
() => Promise<Definition[]>
```

**Returns**: `Promise<Definition[]>`

### import

Imports the provided collection of app definitions.

```ts
(definitions: Definition[], mode?: "replace" | "merge") => Promise<ImportResult>
```

**Parameters**

- **`definitions`** (`Definition[]`, required)
  A collection of app definition objects to be imported.
- **`mode`** (`"replace" | "merge"`, optional)
  Mode for importing app definitions. Use `"replace"` (default) to replace all existing in-memory app definitions.
  Use `"merge"` to update the existing ones and add new ones.

**Returns**: `Promise<ImportResult>`

### remove

Removes an app definition from the in-memory store.

```ts
(name: string) => Promise<void>
```

**Parameters**

- **`name`** (`string`, required)
  Name of the app to be removed.

**Returns**: `Promise<void>`

## Related types

- [Definition](https://docs.interop.io/desktop/reference/javascript/app%20management/definition/index.md)
- [ImportResult](https://docs.interop.io/desktop/reference/javascript/app%20management/importresult/index.md)
