> 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: ReactCompileResultExposureV1

通过
`api.useExposed(Symbol.for('@lynx-js/react/internal:compile-result'))` 获取的带版本号的 React 编译结果暴露接口。

## Properties

### version

> **version**: `1`

暴露 API 的协议版本。

## Methods

### getCompileResult()

> **getCompileResult**(`stats`: `Stats` | `MultiStats`): [`ReactCompileResult`](/next/zh/api/packages/react-rsbuild-plugin/interfaces/ReactCompileResult.md) | `undefined`

读取所提供 compilation 的语义运行时需求。

#### Parameters

| Parameter | Type                    | Description                                                                   |
| --------- | ----------------------- | ----------------------------------------------------------------------------- |
| `stats`   | `Stats` \| `MultiStats` | 原始 Stats 或 MultiStats 对象，应在关闭构建前读取。不支持序列化的 Stats JSON；调用方必须先处理 stats 缺失和构建错误。 |

#### Returns

[`ReactCompileResult`](/next/zh/api/packages/react-rsbuild-plugin/interfaces/ReactCompileResult.md) | `undefined`

返回已知结果；若任一 compilation 没有兼容的语义结果生成方，则返回 `undefined`。
显式 `false` 与 unknown 保持区别。

#### Remarks

只有所有子 compilation 都提供兼容结果时，MultiStats 才会以 OR 合并需求。
在混合环境构建中，传入单个环境的 Stats，即可独立读取该环境的结果。
