readDurationFromConfig()
Home > @backstage/config
> readDurationFromConfig
Reads a duration from a config object.
Signature:
function readDurationFromConfig(config: Config, options?: {
key?: string;
}): HumanDuration;
Parameters
Parameter |
Type |
Description |
---|---|---|
config |
A configuration object | |
options |
{ key?: string; } |
(Optional) |
A duration object
Remarks
This does not support optionality; if you want to support optional durations, you need to first check the presence of the target with config.has(...)
and then call this function.