type of input config
type of config after parsing
the default configuration
Optional
parsers: ConfigParsers<T, U>function used to parse/validate the configuration
Optional
type MyConfig = {
value: number;
label?: string;
};
const getConfig<MyConfig>({
value: 1,
label: 'Title',
}, {
value(value, { defValue }) {
return value < 10 ? value : defValue;
}
});
const config = getConfig({ value: 3 });
Generated using TypeDoc
Creates a function to validate an user configuration object