Skip to content

Commit bbab73c

Browse files
authored
docs: update SWC React options type (#5279)
1 parent cfac9b4 commit bbab73c

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

website/docs/en/plugins/list/plugin-react.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,18 @@ Configure the behavior of SWC to transform React code, the same as SWC's [jsc.tr
3939
- **Type:**
4040

4141
```ts
42-
interface SwcReactOptions {
42+
interface ReactConfig {
4343
pragma?: string;
4444
pragmaFrag?: string;
4545
throwIfNamespace?: boolean;
4646
development?: boolean;
47-
useBuiltins?: boolean;
48-
refresh?: boolean;
47+
refresh?:
48+
| boolean
49+
| {
50+
refreshReg?: string;
51+
refreshSig?: string;
52+
emitFullSignatures?: boolean;
53+
};
4954
runtime?: 'automatic' | 'classic';
5055
importSource?: string;
5156
}

website/docs/zh/plugins/list/plugin-react.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,18 @@ export default {
3939
- **类型:**
4040

4141
```ts
42-
interface SwcReactOptions {
42+
interface ReactConfig {
4343
pragma?: string;
4444
pragmaFrag?: string;
4545
throwIfNamespace?: boolean;
4646
development?: boolean;
47-
useBuiltins?: boolean;
48-
refresh?: boolean;
47+
refresh?:
48+
| boolean
49+
| {
50+
refreshReg?: string;
51+
refreshSig?: string;
52+
emitFullSignatures?: boolean;
53+
};
4954
runtime?: 'automatic' | 'classic';
5055
importSource?: string;
5156
}

0 commit comments

Comments
 (0)