MCPcopy Create free account
hub / github.com/Effect-TS/effect / optional

Function optional

packages/cli/src/internal/args.ts:383–384  ·  view source on GitHub ↗
(self: Args.Args<A>)

Source from the content-addressed store, hash-verified

381
382/** @internal */
383export const optional = <A>(self: Args.Args<A>): Args.Args<Option.Option<A>> =>
384 makeWithDefault(map(self, Option.some), Option.none())
385
386/** @internal */
387export const repeated = <A>(self: Args.Args<A>): Args.Args<Array<A>> => makeVariadic(self, Option.none(), Option.none())

Callers

nothing calls this directly

Calls 2

makeWithDefaultFunction · 0.70
mapFunction · 0.50

Tested by

no test coverage detected