type OneOrMany = T | T[]; type MaybePromise = T | Promise; type ConfigChain = OneOrMany T | void)>; type ConfigChainWithContext = OneOrMany T | void)>; type ConfigChainAsyncWithContext = OneOrMany MaybePromise)>; type ConfigChainMergeContext = OneOrMany T | void)>; /** * Merge one or more configs into a final config, * and allow to modify the config object via a function. */ declare function reduceConfigs({ initial, config, mergeFn, }: { /** * Initial configuration object. */ initial: T; /** * The configuration object, function, or array of configuration objects/functions * to be merged into the initial configuration */ config?: ConfigChain | undefined; /** * The function used to merge configuration objects. * @default Object.assign */ mergeFn?: typeof Object.assign; }): T; /** * Merge one or more configs into a final config, * and allow to modify the config object via a function, the function accepts a context object. */ declare function reduceConfigsWithContext({ initial, config, ctx, mergeFn, }: { /** * Initial configuration object. */ initial: T; /** * The configuration object, function, or array of configuration objects/functions * to be merged into the initial configuration */ config?: ConfigChainWithContext | undefined; /** * Context object that can be used within the configuration functions. */ ctx?: Ctx; /** * The function used to merge configuration objects. * @default Object.assign */ mergeFn?: typeof Object.assign; }): T; /** * Merge one or more configs into a final config, * and allow to modify the config object via an async function, the function accepts a context object. */ declare function reduceConfigsAsyncWithContext({ initial, config, ctx, mergeFn, }: { initial: T; config?: ConfigChainAsyncWithContext | undefined; ctx?: Ctx; mergeFn?: typeof Object.assign; }): Promise; /** * Merge one or more configs into a final config, * and allow to modify the config object via an async function, the function accepts a merged object. */ declare function reduceConfigsMergeContext({ initial, config, ctx, mergeFn, }: { initial: T; config?: ConfigChainMergeContext | undefined; ctx?: Ctx; mergeFn?: typeof Object.assign; }): T; export { type ConfigChain, type ConfigChainAsyncWithContext, type ConfigChainMergeContext, type ConfigChainWithContext, reduceConfigs, reduceConfigsAsyncWithContext, reduceConfigsMergeContext, reduceConfigsWithContext };