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

Function action

packages/effect/src/unstable/cli/GlobalFlag.ts:104–114  ·  view source on GitHub ↗
(options: {
  readonly flag: Flag.Flag<A>
  readonly run: (
    value: A,
    context: HandlerContext
  ) => Effect.Effect<void>
})

Source from the content-addressed store, hash-verified

102 * @since 4.0.0
103 */
104export const action = <A>(options: {
105 readonly flag: Flag.Flag<A>
106 readonly run: (
107 value: A,
108 context: HandlerContext
109 ) => Effect.Effect<void>
110}): Action<A> => ({
111 _tag: "Action",
112 flag: options.flag,
113 run: options.run
114})
115
116/**
117 * Creates a Setting flag that configures the command handler's environment.

Callers 1

GlobalFlag.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected