> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# Interface: ExposedAPI

The exposed API of Rspeedy. Can be used in Rsbuild plugin with [api.useExposed](https://rsbuild.rs/plugins/dev/core#apiuseexposed).

## Example

```ts
import type { ExposedAPI } from '@lynx-js/rspeedy'
const RsbuildPlugin = {
  name: 'my-rsbuild-plugin',
  pre: ['lynx:rsbuild:plugin-api'],
  setup(api) {
    const rspeedyAPI = api.useExposed<ExposedAPI>(Symbol.for('rspeedy.api'))
  },
}
```

## Properties

### config

> **config**: [`Config`](/next/api/packages/rspeedy/interfaces/Config.md)

The user config.

***

### debug

> **debug**: (`message`: `string` | (() => `string`)) => `void`

Print debug logs.

#### Parameters

| Parameter | Type                         | Description          |
| --------- | ---------------------------- | -------------------- |
| `message` | `string` \| (() => `string`) | The printed message. |

#### Returns

`void`

***

### exit

> **exit**: (`code?`: `number`) => `void` | `Promise`\<`void`>

Exit the process.

#### Parameters

| Parameter | Type     | Description    |
| --------- | -------- | -------------- |
| `code?`   | `number` | The exit code. |

#### Returns

`void` | `Promise`\<`void`>

***

### logger

> **logger**: `Logger`

Get the Rspeedy logger.

***

### version

> **version**: `string`

The version of Rspeedy.
