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

Function makeSingle

packages/cli/src/internal/options.ts:1021–1038  ·  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

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