| 1 | /** |
| 2 | * Node.js `Stdio` layer for the current process. |
| 3 | * |
| 4 | * The exported layer reuses the shared Node stdio implementation. It satisfies |
| 5 | * the platform-independent `Stdio` service by reading command-line arguments |
| 6 | * from `process.argv`, consuming input from `process.stdin`, and writing output |
| 7 | * streams to `process.stdout` and `process.stderr`. |
| 8 | * |
| 9 | * @since 4.0.0 |
| 10 | */ |
| 11 | import * as NodeStdio from "@effect/platform-node-shared/NodeStdio" |
| 12 | import type * as Layer from "effect/Layer" |
| 13 | import type { Stdio } from "effect/Stdio" |
| 14 | |
| 15 | /** |
| 16 | * Provides the `Stdio` service backed by the current process arguments, |
| 17 | * stdin, stdout, and stderr streams. |
| 18 | * |
| 19 | * @category layers |
| 20 | * @since 4.0.0 |
| 21 | */ |
| 22 | export const layer: Layer.Layer<Stdio> = NodeStdio.layer |