Files
flights_web_raw/ClientApp/node_modules/reduce-configs/dist/index.d.ts
T
gnezim 0a5ab058a6 Initial commit: Aeroflot Flights Web - Angular 12 baseline
- Angular 12 application with PrimeNG components
- 5 existing Cypress e2e test suites
- SCSS styling with BEM naming convention
- i18n support (10 languages)
- Leaflet map integration
- Complete component hierarchy and routing structure

This baseline will be used for Angular → React migration.
2026-04-05 18:47:57 +03:00

74 lines
2.6 KiB
TypeScript

type OneOrMany<T> = T | T[];
type MaybePromise<T> = T | Promise<T>;
export type ConfigChain<T> = OneOrMany<T | ((config: T) => T | void)>;
export type ConfigChainWithContext<T, Ctx> = OneOrMany<T | ((config: T, ctx: Ctx) => T | void)>;
export type ConfigChainAsyncWithContext<T, Ctx> = OneOrMany<T | ((config: T, ctx: Ctx) => MaybePromise<T | void>)>;
export type ConfigChainMergeContext<T, Ctx> = OneOrMany<T | ((merged: {
value: T;
} & Ctx) => 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<T>({ 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<T> | 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<T, Ctx>({ 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<T, Ctx> | 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<T, Ctx>({ initial, config, ctx, mergeFn, }: {
initial: T;
config?: ConfigChainAsyncWithContext<T, Ctx> | undefined;
ctx?: Ctx;
mergeFn?: typeof Object.assign;
}): Promise<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 merged object.
*/
export declare function reduceConfigsMergeContext<T, Ctx>({ initial, config, ctx, mergeFn, }: {
initial: T;
config?: ConfigChainMergeContext<T, Ctx> | undefined;
ctx?: Ctx;
mergeFn?: typeof Object.assign;
}): T;
export {};