Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
9aoy committed Jul 10, 2024
1 parent 65d9453 commit adf44e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion website/docs/en/plugins/dev/hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,13 @@ In the callback function, the config object in the parameters has already been m
- **Type:**

```ts
type ArrayAtLeastOne<A, B> = [A, ...Array<A | B>] | [...Array<A | B>, A];

type ModifyEnvironmentConfigUtils = {
/** Current environment name */
name: string;
mergeEnvironmentConfig: (
...configs: EnvironmentConfig[]
...configs: ArrayAtLeastOne<MergedEnvironmentConfig, EnvironmentConfig>
) => EnvironmentConfig;
};

Expand Down
4 changes: 3 additions & 1 deletion website/docs/zh/plugins/dev/hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,14 @@ const myPlugin = () => ({

- **类型:**

type ArrayAtLeastOne<A, B> = [A, ...Array<A | B>] | [...Array<A | B>, A];

```ts
type ModifyEnvironmentConfigUtils = {
/** 当前 environment 名称 */
name: string;
mergeEnvironmentConfig: (
...configs: EnvironmentConfig[]
...configs: ArrayAtLeastOne<MergedEnvironmentConfig, EnvironmentConfig>
) => EnvironmentConfig;
};

Expand Down

0 comments on commit adf44e2

Please sign in to comment.