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

# Interface: ExposedAPI

Rspeedy 暴露的 API。可以在 Rsbuild 插件中通过 [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/zh/api/packages/rspeedy/interfaces/Config.md)

用户配置。

***

### debug

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

打印调试日志。

#### Parameters

| Parameter | Type                         | Description |
| --------- | ---------------------------- | ----------- |
| `message` | `string` \| (() => `string`) | 打印的消息。      |

#### Returns

`void`

***

### exit

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

退出进程。

#### Parameters

| Parameter | Type     | Description |
| --------- | -------- | ----------- |
| `code?`   | `number` | 退出码。        |

#### Returns

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

***

### logger

> **logger**: `Logger`

获取 Rspeedy 的 logger。

***

### version

> **version**: `string`

Rspeedy 的版本。
