MCPcopy Index your code
hub / github.com/Effect-TS/effect / duration

Function duration

packages/effect/src/internal/config.ts:339–348  ·  view source on GitHub ↗
(name?: string)

Source from the content-addressed store, hash-verified

337
338/** @internal */
339export const duration = (name?: string): Config.Config<Duration.Duration> => {
340 const config = mapOrFail(string(), (value) => {
341 const duration = Duration.decodeUnknown(value)
342 return Either.fromOption(
343 duration,
344 () => configError.InvalidData([], `Expected a duration but received ${formatUnknown(value)}`)
345 )
346 })
347 return name === undefined ? config : nested(config, name)
348}
349
350/** @internal */
351export const map = dual<

Callers

nothing calls this directly

Calls 2

formatUnknownFunction · 0.85
stringFunction · 0.70

Tested by

no test coverage detected