Skip to content

Commit

Permalink
update the documentation of unitControl.build
Browse files Browse the repository at this point in the history
The type of config was narrowed to `symbol | BasicBuilding` and the parameter description
was updated to inform about its behavior in each case
  • Loading branch information
JeanJPNM committed Feb 27, 2024
1 parent ded08ae commit b08d0ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions compiler/lib/commands.d.ts
Expand Up @@ -898,7 +898,8 @@ declare global {
*
* @param options.block The kind of building to build
* @param options.rotation The rotation of the building, ranges from 0 to 3
* @param options.config The config of the building
* @param options.config The configuration value to use, or a building from
* which the configuration value will be copied.
*
* ```js
* unitControl.build({
Expand All @@ -917,8 +918,11 @@ declare global {
block: BuildingSymbol;
/** The rotation of the building, ranges from 0 to 3 */
rotation: number;
/** The config of the building */
config?: unknown;
/**
* The configuration value to use, or a building from which the
* configuration value will be copied.
*/
config?: symbol | BasicBuilding;
}): void;

/**
Expand Down
2 changes: 1 addition & 1 deletion website/docs/guide/commands.md
Expand Up @@ -495,7 +495,7 @@ Controls the unit bound to the processor

- `block` - The kind of building to build
- `rotation` - The rotation of the building, ranges from 0 to 3
- `config` - The config of the building
- `config` - The configuration value to use, or a building from which the configuration value will be copied.

::: command-example
:::
Expand Down

0 comments on commit b08d0ba

Please sign in to comment.