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

Function prefix

packages/effect/src/unstable/process/ChildProcess.ts:731–739  ·  view source on GitHub ↗
(...args: Array<unknown>)

Source from the content-addressed store, hash-verified

729 (templates: TemplateStringsArray, ...expressions: ReadonlyArray<TemplateExpression>): (self: Command) => Command
730 (self: Command, command: string, args?: ReadonlyArray<string>): Command
731} = function prefix(...args: Array<unknown>): any {
732 if (isCommand(args[0]) && args.length > 1) {
733 const [self, ...rest] = args as [Command, ...Array<unknown>]
734 const prefixSpec = parsePrefixArgs(rest)
735 return applyPrefix(self, prefixSpec)
736 }
737 const prefixSpec = parsePrefixArgs(args)
738 return (self: Command): Command => applyPrefix(self, prefixSpec)
739}
740
741type PrefixSpec = {
742 readonly command: string

Callers

nothing calls this directly

Calls 3

parsePrefixArgsFunction · 0.85
applyPrefixFunction · 0.85
isCommandFunction · 0.70

Tested by

no test coverage detected