/** * Key aliases, for the release where a config key is renamed but existing files * still spell it the old way. */ import { ConfigProvider } from "effect"; /** A map from the current key to the old keys it replaced, most recent first. */ export type ConfigAliases = Readonly>>; /** Options for {@link withAliases}. */ export interface AliasOptions { /** Log a warning the first time each old key answers a lookup. Defaults to `true`. */ readonly warn?: boolean; } /** * Wraps a provider so a renamed key still resolves from its old name. The * current key is always tried first; an old key is only consulted when the * current one is absent, and using it logs one warning per alias (annotated * `logger: "Config"`, so the mitools `Logger` adapter names it). * * The mapping is by path prefix, so aliasing a whole table works: * `{ "dev_server": ["devserver"] }` also resolves `dev_server.port_base`. * * ```ts * const provider = withAliases(base, { "paths.main_clone": ["paths.main"] }); * ``` */ export declare function withAliases(provider: ConfigProvider.ConfigProvider, aliases: ConfigAliases, options?: AliasOptions): ConfigProvider.ConfigProvider;