MCPcopy Create free account
hub / github.com/effect-app/libs / visit

Function visit

repos/effect/packages/effect/src/unstable/cli/internal/help.ts:83–93  ·  view source on GitHub ↗
(current: Command.Any)

Source from the content-addressed store, hash-verified

81 const collected: Array<GlobalFlag.GlobalFlag<any>> = []
82
83 const visit = (current: Command.Any): void => {
84 const impl = toImpl(current)
85 for (const flag of impl.globalFlags) {
86 collected.push(flag)
87 }
88 for (const group of current.subcommands) {
89 for (const subcommand of group.commands) {
90 visit(subcommand)
91 }
92 }
93 }
94
95 visit(command)
96 return dedupeGlobalFlags(collected)

Callers 1

Calls 2

toImplFunction · 0.90
pushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…