type OneOrMany = T | T[]; type MaybePromise = T | Promise; export type ConfigChain = OneOrMany T | void)>; export type ConfigChainWithContext = OneOrMany T | void)>; export type ConfigChainAsyncWithContext = OneOrMany MaybePromise)>; export type ConfigChainMergeContext = OneOrMany T | void)>; /** * Merge one or more configs into a final config, * and allow to modify the config object via a function. */ export 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. */ export 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. */ export 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. */ export declare function reduceConfigsMergeContext({ initial, config, ctx, mergeFn, }: { initial: T; config?: ConfigChainMergeContext | undefined; ctx?: Ctx; mergeFn?: typeof Object.assign; }): T; export {};