Skip to content

Commit cc7b2fd

Browse files
committed
docs: add JSDoc for define methods
1 parent 36878b6 commit cc7b2fd

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

packages/rstack/src/define.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,20 @@ const setConfig = (type: ConfigType, config: Config): void => {
2626
};
2727

2828
type Define = {
29+
/**
30+
* Defines the Rsbuild config for the app.
31+
*
32+
* This config is used by the `rs dev`, `rs build`, and `rs preview` commands.
33+
*/
2934
app: (config: RsbuildConfigDefinition) => void;
35+
/**
36+
* Defines the Rstest config for tests.
37+
*
38+
* This config is used by the `rs test` command.
39+
*
40+
* If `define.app` is also used, Rstest automatically extends the app config unless
41+
* `extends` is set explicitly.
42+
*/
3043
test: (config: RstestConfigExport) => void;
3144
};
3245

0 commit comments

Comments
 (0)