UNPKG

934 BTypeScriptView Raw
1import { Provider } from "@aws-sdk/types";
2import { GetterFromEnv } from "./fromEnv";
3import { GetterFromConfig, SharedConfigInit } from "./fromSharedConfigFiles";
4import { FromStaticConfig } from "./fromStatic";
5export declare type LocalConfigOptions = SharedConfigInit;
6export interface LoadedConfigSelectors<T> {
7 /**
8 * A getter function getting the config values from all the environment
9 * variables.
10 */
11 environmentVariableSelector: GetterFromEnv<T>;
12 /**
13 * A getter function getting config values associated with the inferred
14 * profile from shared INI files
15 */
16 configFileSelector: GetterFromConfig<T>;
17 /**
18 * Default value or getter
19 */
20 default: FromStaticConfig<T>;
21}
22export declare const loadConfig: <T = string>({ environmentVariableSelector, configFileSelector, default: defaultValue }: LoadedConfigSelectors<T>, configuration?: LocalConfigOptions) => Provider<T>;