MCPcopy
hub / github.com/Effect-TS/effect / makeSingle

Function makeSingle

packages/cli/src/internal/options.ts:1020–1037  ·  view source on GitHub ↗
(
  name: string,
  aliases: ReadonlyArray<string>,
  primitiveType: Primitive.Primitive<A>,
  description: HelpDoc.HelpDoc = InternalHelpDoc.empty,
  pseudoName: Option.Option<string> = Option.none()
)

Source from the content-addressed store, hash-verified

1018}
1019
1020const makeSingle = <A>(
1021 name: string,
1022 aliases: ReadonlyArray<string>,
1023 primitiveType: Primitive.Primitive<A>,
1024 description: HelpDoc.HelpDoc = InternalHelpDoc.empty,
1025 pseudoName: Option.Option<string> = Option.none()
1026): Options.Options<A> => {
1027 const op = Object.create(proto)
1028 op._tag = "Single"
1029 op.name = name
1030 op.fullName = makeFullName(name)[1]
1031 op.placeholder = `${Option.getOrElse(pseudoName, () => InternalPrimitive.getTypeName(primitiveType))}`
1032 op.aliases = aliases
1033 op.primitiveType = primitiveType
1034 op.description = description
1035 op.pseudoName = pseudoName
1036 return op
1037}
1038
1039const makeVariadic = <A>(
1040 argumentOption: Options.Options<A>,

Callers 13

booleanFunction · 0.70
choiceFunction · 0.70
choiceWithValueFunction · 0.70
dateFunction · 0.70
directoryFunction · 0.70
fileFunction · 0.70
floatFunction · 0.70
integerFunction · 0.70
keyValueMapFunction · 0.70
redactedFunction · 0.70
secretFunction · 0.70
textFunction · 0.70

Calls 2

makeFullNameFunction · 0.85
createMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…