Skip to content

Commit

Permalink
fix: least one
Browse files Browse the repository at this point in the history
  • Loading branch information
9aoy committed Jul 10, 2024
1 parent b84e2f3 commit 65d9453
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions packages/core/src/types/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,15 @@ export type ModifyRsbuildConfigUtils = {
mergeRsbuildConfig: (...configs: RsbuildConfig[]) => RsbuildConfig;
};

declare function mergeEnvironmentConfig(
userConfig: EnvironmentConfig,
config: MergedEnvironmentConfig,
): MergedEnvironmentConfig;
declare function mergeEnvironmentConfig(
config: MergedEnvironmentConfig,
...configs: EnvironmentConfig[]
): MergedEnvironmentConfig;
type ArrayAtLeastOne<A, B> = [A, ...Array<A | B>] | [...Array<A | B>, A];

export type ModifyEnvironmentConfigUtils = {
/** environment name. */
name: string;
/** Merge multiple Rsbuild environment config objects into one. */
mergeEnvironmentConfig: typeof mergeEnvironmentConfig;
mergeEnvironmentConfig: (
...configs: ArrayAtLeastOne<MergedEnvironmentConfig, EnvironmentConfig>
) => MergedEnvironmentConfig;
};

export type ModifyRsbuildConfigFn = (
Expand Down

0 comments on commit 65d9453

Please sign in to comment.