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

Function prompt

packages/cli/src/internal/command.ts:298–310  ·  view source on GitHub ↗
(
  name: Name,
  prompt: Prompt.Prompt<A>,
  handler: (_: A) => Effect.Effect<void, E, R>
)

Source from the content-addressed store, hash-verified

296
297/** @internal */
298export const prompt = <Name extends string, A, R, E>(
299 name: Name,
300 prompt: Prompt.Prompt<A>,
301 handler: (_: A) => Effect.Effect<void, E, R>
302) =>
303 makeProto(
304 InternalDescriptor.map(
305 InternalDescriptor.prompt(name, prompt),
306 (_) => _.value
307 ),
308 handler,
309 Context.GenericTag(`@effect/cli/Prompt/${name}`)
310 )
311
312/** @internal */
313export const withHandler = dual<

Callers

nothing calls this directly

Calls 2

makeProtoFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected