MCPcopy Create free account
hub / github.com/effect-app/libs / transform

Function transform

repos/effect/packages/effect/src/unstable/cli/Param.ts:1045–1055  ·  view source on GitHub ↗
(
  self: Param<Kind, A>,
  f: (parse: Parse<A>) => Parse<B>
)

Source from the content-addressed store, hash-verified

1043 * port.kind // => "flag"
1044 * ```
1045 *
1046 * @category combinators
1047 * @since 4.0.0
1048 */
1049export const map: {
1050 <A, B>(f: (a: A) => B): <Kind extends ParamKind>(self: Param<Kind, A>) => Param<Kind, B>
1051 <Kind extends ParamKind, A, B>(self: Param<Kind, A>, f: (a: A) => B): Param<Kind, B>
1052} = dual(2, <Kind extends ParamKind, A, B>(self: Param<Kind, A>, f: (a: A) => B) => {
1053 const parse: Parse<B> = (args: ParsedArgs) =>
1054 Effect.map(
1055 self.parse(args),
1056 ([operands, value]) => [operands, f(value)] as const
1057 )
1058 return Object.assign(Object.create(Proto), {

Callers 11

Param.tsFile · 0.70
transformSingleFunction · 0.70
ensureStructFunction · 0.50
getPayloadFunction · 0.50
Atom.tsFile · 0.50
makeCompilerSqliteFunction · 0.50
withStatementFunction · 0.50
UrlParams.tsFile · 0.50
HttpClient.tsFile · 0.50
withScopeFunction · 0.50

Calls 1

fFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…