UNPKG

929 BTypeScriptView Raw
1/** @module config */
2import { ConfigParams } from './ConfigParams';
3/**
4 * A helper class to parameters from "options" configuration section.
5 *
6 * ### Example ###
7 *
8 * let config = ConfigParams.fromTuples(
9 * ...
10 * "options.param1", "ABC",
11 * "options.param2", 123
12 * );
13 *
14 * let options = OptionsResolver.resolve(config); // Result: param1=ABC;param2=123
15 */
16export declare class OptionResolver {
17 /**
18 * Resolves an "options" configuration section from component configuration parameters.
19 *
20 * @param config configuration parameters
21 * @param configAsDefault (optional) When set true the method returns the entire parameter set when "options" section is not found. Default: false
22 * @returns configuration parameters from "options" section
23 */
24 static resolve(config: ConfigParams, configAsDefault?: boolean): ConfigParams;
25}