(name?: string)
| 346 | |
| 347 | /** @internal */ |
| 348 | export const duration = (name?: string): Config.Config<Duration.Duration> => { |
| 349 | const config = mapOrFail(string(), (value) => { |
| 350 | const duration = Duration.decodeUnknown(value) |
| 351 | return Either.fromOption( |
| 352 | duration, |
| 353 | () => configError.InvalidData([], `Expected a duration but received ${formatUnknown(value)}`) |
| 354 | ) |
| 355 | }) |
| 356 | return name === undefined ? config : nested(config, name) |
| 357 | } |
| 358 | |
| 359 | /** @internal */ |
| 360 | export const map = dual< |
nothing calls this directly
no test coverage detected