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

Function path

packages/effect/src/unstable/cli/Param.ts:609–623  ·  view source on GitHub ↗
(
  kind: Kind,
  name: string,
  options?: {
    readonly pathType?: Primitive.PathType | undefined
    readonly mustExist?: boolean | undefined
    readonly typeName?: string | undefined
  }
)

Source from the content-addressed store, hash-verified

607 * @since 4.0.0
608 */
609export const path = <Kind extends ParamKind>(
610 kind: Kind,
611 name: string,
612 options?: {
613 readonly pathType?: Primitive.PathType | undefined
614 readonly mustExist?: boolean | undefined
615 readonly typeName?: string | undefined
616 }
617): Param<Kind, string> =>
618 makeSingle({
619 name,
620 kind,
621 primitiveType: Primitive.path(options?.pathType ?? "either", options?.mustExist),
622 typeName: options?.typeName
623 })
624
625/**
626 * Creates a directory path parameter.

Callers 2

directoryFunction · 0.70
fileFunction · 0.70

Calls 1

makeSingleFunction · 0.70

Tested by

no test coverage detected