MCPcopy Index your code
hub / github.com/Effect-TS/effect / keyValueMap

Function keyValueMap

packages/cli/src/internal/options.ts:366–378  ·  view source on GitHub ↗
(
  option: string | Options.Options<string>
)

Source from the content-addressed store, hash-verified

364
365/** @internal */
366export const keyValueMap = (
367 option: string | Options.Options<string>
368): Options.Options<HashMap.HashMap<string, string>> => {
369 if (typeof option === "string") {
370 const single = makeSingle(option, Arr.empty(), InternalPrimitive.text)
371 return makeKeyValueMap(single as Single)
372 }
373 if (!isSingle(option as Instruction)) {
374 throw new Error("InvalidArgumentException: only single options can be key/value maps")
375 } else {
376 return makeKeyValueMap(option as Single)
377 }
378}
379
380/** @internal */
381export const none: Options.Options<void> = (() => {

Callers

nothing calls this directly

Calls 3

makeKeyValueMapFunction · 0.85
makeSingleFunction · 0.70
isSingleFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…