Function
action
(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 | */ |
| 104 | export 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. |
Tested by
no test coverage detected